Package zombie.core.textures
Class Mask
java.lang.Object
zombie.core.textures.Mask
- All Implemented Interfaces:
Serializable
,Cloneable
- See Also:
-
Constructor Summary
ConstructorDescriptionMask
(boolean[] mask1, int maskW, int maskH, int x, int y, int width, int height) Mask
(int width, int height) Creates a new instance of Mask.
The Mask will be maked fullyCreates a new instance of Mask from a textureMask
(BooleanGrid mask1, int maskW, int maskH, int x, int y, int width, int height) Mask
(ITexture texture, BooleanGrid mask) -
Method Summary
-
Constructor Details
-
Mask
public Mask(int width, int height) Creates a new instance of Mask.
The Mask will be maked fully- Parameters:
width
- width of maskheight
- height of mask- See Also:
-
Mask
Creates a new instance of Mask from a texture- Parameters:
texture
- the source texture
-
Mask
-
Mask
public Mask(boolean[] mask1, int maskW, int maskH, int x, int y, int width, int height) -
Mask
-
Mask
-
Mask
-
Mask
-
Mask
-
-
Method Details
-
clone
-
full
public void full()creates a full-rectangular mask -
set
public void set(int x, int y, boolean val) changes the x,y value of the mask- Parameters:
x
- coordinatey
- coordinateval
- new value
-
get
public boolean get(int x, int y) -
save
-