mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 18:55:54 +00:00
Delay start for animation
This commit is contained in:
parent
1005796e13
commit
a9a7b234fb
9 changed files with 108 additions and 23 deletions
|
|
@ -18,9 +18,13 @@ public partial class PlayerDamageReceiver : Area2D
|
|||
|
||||
[Signal]
|
||||
public delegate void HealthChangedEventHandler(float newValue, float maxValue);
|
||||
[Signal]
|
||||
public delegate void HealthDecreasedEventHandler(float value, float newValue, float maxValue);
|
||||
|
||||
[Signal]
|
||||
public delegate void ShieldChangedEventHandler(float newValue, float maxValue);
|
||||
[Signal]
|
||||
public delegate void ShieldDecreasedEventHandler(float value, float newValue, float maxValue);
|
||||
|
||||
[Signal]
|
||||
public delegate void DeathEventHandler();
|
||||
|
|
@ -42,12 +46,24 @@ public partial class PlayerDamageReceiver : Area2D
|
|||
_healthProvider.ResourceChanged += ((value, maxValue) =>
|
||||
{
|
||||
//if (!Enabled) return;
|
||||
Hud.Instance?.UpdateHealth(value, maxValue);
|
||||
EmitSignal(SignalName.HealthChanged, value, maxValue);
|
||||
});
|
||||
|
||||
_healthProvider.ResourceDecreased += (value, newValue, maxValue) =>
|
||||
{
|
||||
EmitSignal(SignalName.HealthDecreased, value, newValue, maxValue);
|
||||
};
|
||||
|
||||
_shieldProvider.ResourceDecreased += (value, newValue, maxValue) =>
|
||||
{
|
||||
EmitSignal(SignalName.ShieldDecreased, value, newValue, maxValue);
|
||||
};
|
||||
|
||||
_shieldProvider.ResourceChanged += ((value, maxValue) =>
|
||||
{
|
||||
//if (!Enabled) return;
|
||||
Hud.Instance?.UpdateShield(value, maxValue);
|
||||
EmitSignal(SignalName.ShieldChanged, value, maxValue);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue