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 TypeMethodDescriptionintReturns the height of thisRectanglein world units.intgetWidth()Returns the width of thisRectanglein world units.setHeight(int height) Sets the height of thisRectanglein world units.Sets the height of thisRectanglein world units.setWidth(int width) Sets the width of thisRectanglein world units.Sets the width of thisRectanglein 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, setLineWidthMethods inherited from class com.codingame.gameengine.module.entities.BlendableEntity
getBlendMode, setBlendModeMethods 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 thisRectanglein world units.Default is 100.
- Parameters:
width- the width for thisRectangle.- Returns:
- this
Rectangle
-
setWidth
Sets the width of thisRectanglein 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 thisRectanglein world units.Default is 100.
- Returns:
- the width of this
Rectangle.
-
setHeight
Sets the height of thisRectanglein world units.Default is 100.
- Parameters:
height- the height for thisRectangle.- Returns:
- this
Rectangle
-
setHeight
Sets the height of thisRectanglein 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 thisRectanglein world units.Default is 100.
- Returns:
- the height of this
Rectangle.
-