private void UpdateUI() { if (HP == maxHP) { HPBar.gameObject.SetActive(false); } else { HPBar.gameObject.SetActive(true); HPBar.SetProgress(HP / maxHP); } OnHPUpdate?.Invoke(); }
protected virtual void _onHPUpdate() { OnHPUpdate?.Invoke(this, new MonsterUpdateEventArgs(this)); }
protected virtual void _onHPUpdate() { MonsterEventArgs args = new MonsterEventArgs(this); OnHPUpdate?.Invoke(this, args); }