diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-05 23:17:47 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-12-05 23:17:47 +0100 |
commit | ae06c83c52a9058d01252b2c557f6340b93b7b81 (patch) | |
tree | e505c21a6e39f716b2c0dd95ddf6013c2d011b91 /core/src/ch/asynk/tankontank/engine | |
parent | 19be2059d793166f3813ab3c307a52338426b25b (diff) | |
download | RustAndDust-ae06c83c52a9058d01252b2c557f6340b93b7b81.zip RustAndDust-ae06c83c52a9058d01252b2c557f6340b93b7b81.tar.gz |
Moveable: add setAlpha(float)
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 13 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/gfx/Moveable.java | 1 |
2 files changed, 8 insertions, 6 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index 66c7122..4834b45 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -260,6 +260,13 @@ public abstract class Pawn implements Moveable, Disposable } @Override + public void setAlpha(float alpha) + { + image.setAlpha(alpha); + overlays.setAlpha(alpha); + } + + @Override public float getX() { return image.getX(); @@ -368,12 +375,6 @@ public abstract class Pawn implements Moveable, Disposable return seq; } - public void setAlpha(float alpha) - { - image.setAlpha(alpha); - overlays.setAlpha(alpha); - } - @Override public void draw(Batch batch) { diff --git a/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java b/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java index e9ac4cd..0f57595 100644 --- a/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java +++ b/core/src/ch/asynk/tankontank/engine/gfx/Moveable.java @@ -4,6 +4,7 @@ import ch.asynk.tankontank.engine.Faction; public interface Moveable extends Drawable { + public void setAlpha(float alpha); public float getX(); public float getY(); public float getWidth(); |