mana bar
This commit is contained in:
@@ -4,8 +4,10 @@ using System;
|
||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_heart.png")]
|
||||
public partial class Healthbar : ProgressBar
|
||||
{
|
||||
private Timer _damageCatchUpTimer;
|
||||
private ProgressBar _damagedHealth;
|
||||
private Timer _damageCatchUpTimer = null!;
|
||||
private ProgressBar _damagedHealth = null!;
|
||||
|
||||
[Export] public StyleBox? BarStyle;
|
||||
|
||||
private float _currentHealth;
|
||||
public float CurrentHealth
|
||||
@@ -21,6 +23,9 @@ public partial class Healthbar : ProgressBar
|
||||
|
||||
_damageCatchUpTimer.Timeout += OnDamageCatchUp;
|
||||
Visible = false;
|
||||
|
||||
if (BarStyle != null)
|
||||
AddThemeStyleboxOverride("fill", BarStyle);
|
||||
}
|
||||
|
||||
public void Initialize(float initialHealth)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_0sgot"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0k5hr"]
|
||||
bg_color = Color(0.698864, 0.047356047, 0, 1)
|
||||
bg_color = Color(0.69803923, 0.047058824, 0, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0sgot"]
|
||||
bg_color = Color(0.14767182, 0.14767182, 0.14767176, 1)
|
||||
|
||||
Reference in New Issue
Block a user