Finalized health bar and obstacle course code

This commit is contained in:
djkellerman
2025-04-17 23:33:03 -04:00
parent 7f4556853f
commit c2463da317
11 changed files with 1544 additions and 2028 deletions

View File

@@ -50,6 +50,16 @@ namespace Player
/// </summary>
public event System.Action<GameObject> OnPlayerPunched;
/// <summary>
/// Event triggered when a player dies.
/// </summary>
public event System.Action<GameObject> OnPlayerDeath;
/// <summary>
/// Event triggered when a player respawns.
/// </summary>
public event System.Action<GameObject> OnPlayerRespawn;
/// <summary>
/// Unity Start method. Initializes the animator reference.
/// </summary>
@@ -172,6 +182,7 @@ namespace Player
dying = true;
AudioManager.Instance.PlaySound("Death Simple");
OnPlayerDeath?.Invoke(gameObject);
}
}
@@ -201,6 +212,7 @@ namespace Player
{
damageable.ResetDamage();
}
OnPlayerRespawn?.Invoke(gameObject);
}
/// <summary>