public void Die()
        {
            if (droppedPotion)
            {
                return;
            }

            speed     = 0.0f;
            isAlive   = false;
            canAttack = false;

            EnemyDies?.Invoke(this, EventArgs.Empty);

            droppedPotion = true;
        }
示例#2
0
 public void SubscribeEnemyDies(EnemyDies enemyDies)
 {
     EventMgr.Instance.EnemyDied += enemyDies;
     Debug.LogWarning("[I] This method is deprecated, use AddListener function instead");
 }