Ejemplo n.º 1
0
    void Start()
    {
        //  if (_player == null)
        //    _player.GetComponent<EventSystem>().AddListener(HPEvent.CHANGED, OnHealthChanged);
        _player.GetComponent <EventSystem>().AddListener(HPEvent.CHANGED, OnHealthChanged);
        //   _player.GetComponent<EventSystem>().AddListener(HPEvent.HEALED, OnHeal);

        _maxPlayerHealth = _player.GetComponent <Stats>().hp;
    }
Ejemplo n.º 2
0
 void Start()
 {
     _player.GetComponent <EventSystem>().AddListener(HPEvent.DIED, OnPlayerDied);
 }