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