예제 #1
0
        private void Die()
        {
            // FIRE EVENT TO GAME MANAGER, IN GAME MANAGER IF ALL THE PLAYERS ARE DEAD, THEN DO THIS
            HeroDiedEventInfo hdei = new HeroDiedEventInfo();

            hdei.EventDescription = "Unit " + this.tag + " has died";
            hdei.HeroName         = this.gameObject.name;
            EventSystem.Current.FireEvent(hdei);
            Destroy(this.gameObject);
        }
예제 #2
0
 private void HeroDied(HeroDiedEventInfo hdei)
 {
     SceneManager.LoadScene("MainScene", LoadSceneMode.Single);
 }