Events example
public class Player : MonoBehaviour
{
public void Start()
{
PlayerHealth.onGameOver += RestartGame;
}
private void RestartGame()
{
}
}
public class PlayerHealth : MonoBehaviour
{
public delegate void OnGameOver();
public static event OnGameOver onGameOver;
}