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