|
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);
|
|
}
|
|
} |