diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-02 12:05:18 +0100 | 
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-02 12:05:18 +0100 | 
| commit | a97d1970b435f5a9de5ba9fcec48619140a0ad29 (patch) | |
| tree | e01429a684e58e4018f8bb96a2919c04529bc241 /core/src/ch/asynk/tankontank/engine/gfx | |
| parent | d07be94ba960a71174fa178879396fde491b7f7a (diff) | |
| download | RustAndDust-a97d1970b435f5a9de5ba9fcec48619140a0ad29.zip RustAndDust-a97d1970b435f5a9de5ba9fcec48619140a0ad29.tar.gz  | |
remove engine/gfx/Image: use Sprite instead
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine/gfx')
| -rw-r--r-- | core/src/ch/asynk/tankontank/engine/gfx/Image.java | 63 | 
1 files changed, 0 insertions, 63 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/gfx/Image.java b/core/src/ch/asynk/tankontank/engine/gfx/Image.java deleted file mode 100644 index a85cabf..0000000 --- a/core/src/ch/asynk/tankontank/engine/gfx/Image.java +++ /dev/null @@ -1,63 +0,0 @@ -package ch.asynk.tankontank.engine.gfx; - -import com.badlogic.gdx.utils.Disposable; -import com.badlogic.gdx.graphics.Texture; -import com.badlogic.gdx.graphics.g2d.TextureRegion; -import com.badlogic.gdx.graphics.g2d.Batch; -import com.badlogic.gdx.graphics.g2d.Sprite; -import com.badlogic.gdx.graphics.glutils.ShapeRenderer; - -public class Image extends Sprite implements Drawable, Disposable -{ -    private Texture texture; - -    protected Image() -    { -    } - -    public Image(Texture texture) -    { -        super(texture); -        this.texture = texture; -    } - -    public Image(TextureRegion region) -    { -        super(region); -        this.texture = null; -    } - -    @Override -    public void dispose() -    { -        if (texture != null) texture.dispose(); -    } - -    public boolean hit(float x, float y) -    { -        return ((x >= getX()) && (y >= getY()) && (x <= (getX() + getWidth())) && (y <= (getY() + getHeight()))); -    } - -    public void setPosition(float x, float y, float r) -    { -        setPosition(x, y); -        setRotation(r); -    } - -    public void centerOn(float cx, float cy) -    { -        setPosition((cx - (getWidth() / 2f)), (cy - (getHeight() / 2f))); -    } - -    @Override -    public void draw(Batch batch) -    { -        super.draw(batch); -    } - -    @Override -    public void drawDebug(ShapeRenderer shapes) -    { -        shapes.rect(getX(), getY(), (getWidth() / 2f), (getHeight() / 2f), getWidth(), getHeight(), getScaleX(), getScaleY(), getRotation()); -    } -}  | 
