public void Die() { if (droppedPotion) { return; } speed = 0.0f; isAlive = false; canAttack = false; EnemyDies?.Invoke(this, EventArgs.Empty); droppedPotion = true; }
public void SubscribeEnemyDies(EnemyDies enemyDies) { EventMgr.Instance.EnemyDied += enemyDies; Debug.LogWarning("[I] This method is deprecated, use AddListener function instead"); }