summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/engine/HeadedPawn.java7
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java6
-rw-r--r--core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java6
3 files changed, 19 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/HeadedPawn.java b/core/src/ch/asynk/tankontank/engine/HeadedPawn.java
index fb362bc..d237e88 100644
--- a/core/src/ch/asynk/tankontank/engine/HeadedPawn.java
+++ b/core/src/ch/asynk/tankontank/engine/HeadedPawn.java
@@ -30,6 +30,13 @@ public abstract class HeadedPawn extends Pawn
}
@Override
+ public void setAlpha(float alpha)
+ {
+ super.setAlpha(alpha);
+ head.setAlpha(alpha);
+ }
+
+ @Override
public float getRotation()
{
return orientation.r();
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 11329b6..66c7122 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -368,6 +368,12 @@ 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/StackedImages.java b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
index a659c68..cb91016 100644
--- a/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
+++ b/core/src/ch/asynk/tankontank/engine/gfx/StackedImages.java
@@ -47,6 +47,12 @@ public class StackedImages implements Drawable, Disposable
return false;
}
+ public void setAlpha(float alpha)
+ {
+ for (int i = 0, n = sprites.size; i < n; i++)
+ sprites.get(i).setAlpha(alpha);
+ }
+
public void rotate(int i, float r)
{
sprites.get(i).setRotation(r);