Exemplo 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;
    }
Exemplo n.º 2
0
 void Start()
 {
     _player.GetComponent <EventSystem>().AddListener(HPEvent.DIED, OnPlayerDied);
 }