Everything related to chat functionality, and updating the projectile prefab to rotate properly

This commit is contained in:
Matt F 2026-05-15 13:40:13 -07:00
parent d92d00c83f
commit 66f84652dc
14 changed files with 1133 additions and 121 deletions

View file

@ -387,8 +387,20 @@ namespace TD.Gameplay
private void ShowLifeLossClientRpc(Vector3 worldPos, int amount)
{
FloatingTextSpawner.Instance?.SpawnLifeLoss(worldPos, amount);
OnLifeLost?.Invoke(amount);
}
// ----- Local-only notification events -----------------------------
/// <summary>
/// Fired on every peer immediately after a life-loss popup spawns.
/// HUD subscribes to flash a centered banner; gameplay code can also
/// hook this for audio cues, screen-shake, etc. Argument is the number
/// of lives lost (usually 1, but boss enemies with LivesCost &gt; 1
/// fire a single event carrying the larger value).
/// </summary>
public static event System.Action<int> OnLifeLost;
// ----- Helpers ----------------------------------------------------
private void UnsubscribeEnemy(EnemyHealth health)