From ae06c83c52a9058d01252b2c557f6340b93b7b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 5 Dec 2014 23:17:47 +0100 Subject: Moveable: add setAlpha(float) --- core/src/ch/asynk/tankontank/engine/Pawn.java | 13 +++++++------ 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(); -- cgit v1.1-2-g2b99