Class Rectangle
java.lang.Object
com.codingame.gameengine.module.entities.Entity<T>
com.codingame.gameengine.module.entities.BlendableEntity<T>
com.codingame.gameengine.module.entities.Shape<Rectangle>
com.codingame.gameengine.module.entities.Rectangle
- All Implemented Interfaces:
Mask
A Rectangle specifies an area in a the world
enclosed by the Rectangle's upper-left point (x,y), its width, and its height.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.codingame.gameengine.module.entities.BlendableEntity
BlendableEntity.BlendMode
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the height of thisRectangle
in world units.int
getWidth()
Returns the width of thisRectangle
in world units.setHeight
(int height) Sets the height of thisRectangle
in world units.Sets the height of thisRectangle
in world units.setWidth
(int width) Sets the width of thisRectangle
in world units.Sets the width of thisRectangle
in world units.Methods inherited from class com.codingame.gameengine.module.entities.Shape
getFillAlpha, getFillColor, getLineAlpha, getLineColor, getLineWidth, setFillAlpha, setFillAlpha, setFillColor, setFillColor, setLineAlpha, setLineAlpha, setLineColor, setLineColor, setLineWidth, setLineWidth
Methods inherited from class com.codingame.gameengine.module.entities.BlendableEntity
getBlendMode, setBlendMode
Methods inherited from class com.codingame.gameengine.module.entities.Entity
getAlpha, getId, getMask, getParent, getRotation, getScaleX, getScaleY, getSkewX, getSkewY, getX, getY, getZIndex, isVisible, requireValidAlpha, requireValidColor, self, set, set, setAlpha, setAlpha, setMask, setMask, setRotation, setRotation, setScale, setScale, setScaleX, setScaleX, setScaleY, setScaleY, setSkewX, setSkewX, setSkewY, setSkewY, setVisible, setX, setX, setY, setY, setZIndex
-
Method Details
-
setWidth
Sets the width of thisRectangle
in world units.Default is 100.
- Parameters:
width
- the width for thisRectangle
.- Returns:
- this
Rectangle
-
setWidth
Sets the width of thisRectangle
in world units.Default is 100.
- Parameters:
width
- the width for thisRectangle
.curve
- the transition to animate between values of this property.- Returns:
- this
Rectangle
-
getWidth
public int getWidth()Returns the width of thisRectangle
in world units.Default is 100.
- Returns:
- the width of this
Rectangle
.
-
setHeight
Sets the height of thisRectangle
in world units.Default is 100.
- Parameters:
height
- the height for thisRectangle
.- Returns:
- this
Rectangle
-
setHeight
Sets the height of thisRectangle
in world units.Default is 100.
- Parameters:
height
- the height for thisRectangle
.curve
- the transition to animate between values of this property.- Returns:
- this
Rectangle
-
getHeight
public int getHeight()Returns the height of thisRectangle
in world units.Default is 100.
- Returns:
- the height of this
Rectangle
.
-