added easier way to smooth transition colors for status effect bars
This commit is contained in:
parent
aad923ea48
commit
c98407c516
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user