void Die() { GameObject.FindObjectOfType <CharacterControllerScript>().destroyedMonster(this.gameObject); showPopup = false; gui.ChangeKillCount(1); //anim.Play("death"); //yield return new WaitForSeconds(2f); Destroy(this.gameObject); }