protected void Die()
        {
            if (isDead)
            {
                return;
            }
            if (gameObject.tag != "Player" && gameObject.tag != "Pickup")
            {
                StartCoroutine(expPopup.ShowPopup(baseStats.GetStat(Stat.GainedExperience)));
            }

            animator.SetTrigger("die");
            actionSheduler.CancelCurrentAction();
            isDead = true;
        }
Esempio n. 2
0
 private void SuscpicousBehaviour()
 {
     GetComponent <NavMeshAgent>().isStopped = true;
     actionSheduler.CancelCurrentAction();
 }