Class TilingSprite
java.lang.Object
com.codingame.gameengine.module.entities.Entity<T>
com.codingame.gameengine.module.entities.BlendableEntity<T>
com.codingame.gameengine.module.entities.TextureBasedEntity<T>
com.codingame.gameengine.module.entities.SpriteBasedEntity<TilingSprite>
com.codingame.gameengine.module.entities.TilingSprite
- All Implemented Interfaces:
Mask
A TilingSprite is a graphical entity which displays a tiling image. That image must be loaded into the viewer's texture cache, which you can
configure by adding files to the
assets
folder of your game's project.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.codingame.gameengine.module.entities.BlendableEntity
BlendableEntity.BlendMode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the horizontal scale of the image that is being tiled.double
Gets the vertical scale of the image that is being tiled.int
getTileX()
Sets the X offset of the image that is being tiled.int
getTileY()
Sets the Y offset of the image that is being tiled.setTileScale
(double tileScale) Sets both the horizontal and vertical scale of the image that is being tiled.setTileScale
(double tileScale, Curve curve) Sets both the horizontal and vertical scale of the image that is being tiled.setTileScaleX
(double tileScaleX) Sets the horizontal scale of the image that is being tiled.setTileScaleX
(double tileScaleX, Curve curve) Sets the horizontal scale of the image that is being tiled.setTileScaleY
(double tileScaleY) Sets the vertical scale of the image that is being tiled.setTileScaleY
(double tileScaleY, Curve curve) Sets the vertical scale of the image that is being tiled.setTileX
(int tileX) Sets the X offset of the image that is being tiled.Sets the X offset of the image that is being tiled.setTileY
(int tileY) Sets the Y offset of the image that is being tiled.Sets the Y offset of the image that is being tiled.Methods inherited from class com.codingame.gameengine.module.entities.SpriteBasedEntity
getBaseHeight, getBaseWidth, getImage, getScaleMode, setBaseHeight, setBaseWidth, setImage, setScaleMode
Methods inherited from class com.codingame.gameengine.module.entities.TextureBasedEntity
getAnchorX, getAnchorY, getTint, setAnchor, setAnchorX, setAnchorX, setAnchorY, setAnchorY, setTint, setTint
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
-
Constructor Details
-
TilingSprite
public TilingSprite()
-
-
Method Details
-
setTileX
Sets the X offset of the image that is being tiled.- Parameters:
tileX
- the X offset of the image that is being tiled- Returns:
- this
Entity
-
setTileX
Sets the X offset of the image that is being tiled.- Parameters:
tileX
- the X offset of the image that is being tiledcurve
- the transition to animate between values of this property- Returns:
- this
Entity
-
setTileY
Sets the Y offset of the image that is being tiled.- Parameters:
tileY
- the Y offset of the image that is being tiled- Returns:
- this
Entity
-
setTileY
Sets the Y offset of the image that is being tiled.- Parameters:
tileY
- the Y offset of the image that is being tiledcurve
- the transition to animate between values of this property- Returns:
- this
Entity
-
setTileScale
Sets both the horizontal and vertical scale of the image that is being tiled.- Parameters:
tileScale
- the scale of the image that is being tiled- Returns:
- this
Entity
-
setTileScale
Sets both the horizontal and vertical scale of the image that is being tiled.- Parameters:
tileScale
- the scale of the image that is being tiledcurve
- the transition to animate between values of this property- Returns:
- this
Entity
-
setTileScaleX
Sets the horizontal scale of the image that is being tiled.- Parameters:
tileScaleX
- the horizontal scale of the image that is being tiled- Returns:
- this
Entity
-
setTileScaleX
Sets the horizontal scale of the image that is being tiled.- Parameters:
tileScaleX
- the horizontal scale of the image that is being tiledcurve
- the transition to animate between values of this property- Returns:
- this
Entity
-
setTileScaleY
Sets the vertical scale of the image that is being tiled.- Parameters:
tileScaleY
- the vertical scale of the image that is being tiled- Returns:
- this
Entity
-
setTileScaleY
Sets the vertical scale of the image that is being tiled.- Parameters:
tileScaleY
- the vertical scale of the image that is being tiledcurve
- the transition to animate between values of this property- Returns:
- this
Entity
-
getTileX
public int getTileX()Sets the X offset of the image that is being tiled.- Returns:
- the X offset of the image that is being tiled
-
getTileY
public int getTileY()Sets the Y offset of the image that is being tiled.- Returns:
- the Y offset of the image that is being tiled
-
getTileScaleX
public double getTileScaleX()Gets the horizontal scale of the image that is being tiled.- Returns:
- the horizontal scale of the image that is being tiled
-
getTileScaleY
public double getTileScaleY()Gets the vertical scale of the image that is being tiled.- Returns:
- the vertical scale of the image that is being tiled
-