Class BlockDrawable
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
-
- com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
-
- com.bombinggames.wurfelengine.mapeditor.BlockDrawable
-
public class BlockDrawable extends com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawablea class what renders a block using the drawable interface.
-
-
Constructor Summary
Constructors Constructor Description BlockDrawable(byte id)BlockDrawable(byte id, byte value, float size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height)voiddraw(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)floatgetBottomHeight()floatgetLeftWidth()floatgetMinWidth()floatgetOffstringX()Get the value of offstringXfloatgetOffstringY()Get the value of offstringYRenderCellgetRenderBlock()floatgetRightWidth()floatgetTopHeight()protected bytegetValue()voidsetOffsetX(float offstringX)Set the value of offstringXvoidsetOffsetY(float offstringY)Set the value of offstringYprotected voidsetValue(byte value)Set game and sprite value of this block.-
Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
getMinHeight, getName, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setName, setRightWidth, setTopHeight, toString
-
Methods inherited from interface com.badlogic.gdx.scenes.scene2d.utils.Drawable
getMinHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight
-
-
-
-
Method Detail
-
setValue
protected void setValue(byte value)
Set game and sprite value of this block.- Parameters:
value-
-
getValue
protected byte getValue()
- Returns:
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height)- Overrides:
drawin classcom.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
-
getOffstringX
public float getOffstringX()
Get the value of offstringX- Returns:
- the value of offstringX
-
setOffsetX
public void setOffsetX(float offstringX)
Set the value of offstringX- Parameters:
offstringX- new value of offstringX
-
getOffstringY
public float getOffstringY()
Get the value of offstringY- Returns:
- the value of offstringY
-
setOffsetY
public void setOffsetY(float offstringY)
Set the value of offstringY- Parameters:
offstringY- new value of offstringY
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)- Overrides:
drawin classcom.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable- Parameters:
batch-x-y-originX-originY-width-height-scaleX-scaleY-rotation-
-
getLeftWidth
public float getLeftWidth()
- Overrides:
getLeftWidthin classcom.badlogic.gdx.scenes.scene2d.utils.BaseDrawable- Returns:
-
getRightWidth
public float getRightWidth()
- Overrides:
getRightWidthin classcom.badlogic.gdx.scenes.scene2d.utils.BaseDrawable- Returns:
-
getTopHeight
public float getTopHeight()
- Overrides:
getTopHeightin classcom.badlogic.gdx.scenes.scene2d.utils.BaseDrawable- Returns:
-
getBottomHeight
public float getBottomHeight()
- Overrides:
getBottomHeightin classcom.badlogic.gdx.scenes.scene2d.utils.BaseDrawable- Returns:
-
getMinWidth
public float getMinWidth()
- Overrides:
getMinWidthin classcom.badlogic.gdx.scenes.scene2d.utils.BaseDrawable- Returns:
-
getRenderBlock
public RenderCell getRenderBlock()
- Returns:
-
-