From c98407c51668f2b9e71990db65696b4dc9061f4c Mon Sep 17 00:00:00 2001 From: Recrown Date: Thu, 10 Aug 2017 02:54:52 -0500 Subject: [PATCH] added easier way to smooth transition colors for status effect bars --- core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java b/core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java index 5aafbdc..797ba03 100755 --- a/core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java +++ b/core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java @@ -10,6 +10,7 @@ import com.badlogic.gdx.graphics.Texture.TextureFilter; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.actions.Actions; import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; import com.badlogic.gdx.scenes.scene2d.ui.Label; @@ -188,6 +189,14 @@ public class GameHUD extends Stage { rightStatusBar.setColor(r, g, b, a); } + public void changeStatusColor(Color color, float duration) { + leftStatusBar.clearActions(); + rightStatusBar.clearActions(); + + leftStatusBar.addAction(Actions.color(color, duration)); + rightStatusBar.addAction(Actions.color(color, duration)); + } + public HealthBar getHealthBar() { return healthBar; }