evershade/Assets/Scripts/Managers/EventManager.cs

13 lines
293 B
C#

using System;
using UnityEngine;
// Example: EventManager.cs
public class EventManager : MonoBehaviour
{
public static event Action<int> OnPlayerHealthChanged;
public static void PlayerHealthChanged(int health)
{
OnPlayerHealthChanged?.Invoke(health);
}
}