com.badlogic.gdx.scenes.scene2d.utils
Class SpriteDrawable
java.lang.Object
com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
com.badlogic.gdx.scenes.scene2d.utils.SpriteDrawable
- All Implemented Interfaces:
- Drawable
public class SpriteDrawable
- extends BaseDrawable
Drawable for a Sprite
.
- Author:
- Nathan Sweet
Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable |
getBottomHeight, getLeftWidth, getMinHeight, getMinWidth, getRightWidth, getTopHeight, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight |
SpriteDrawable
public SpriteDrawable()
- Creates an unitialized SpriteDrawable. The sprite must be set before use.
SpriteDrawable
public SpriteDrawable(Sprite sprite)
SpriteDrawable
public SpriteDrawable(SpriteDrawable drawable)
draw
public void draw(SpriteBatch batch,
float x,
float y,
float width,
float height)
- Description copied from interface:
Drawable
- Draws this drawable at the specified bounds. The drawable should be tinted with
SpriteBatch.getColor()
, possibly by
mixing its own color.
- Specified by:
draw
in interface Drawable
- Overrides:
draw
in class BaseDrawable
setSprite
public void setSprite(Sprite sprite)
getSprite
public Sprite getSprite()
Copyright © 2013. All Rights Reserved.