Ejemplo n.º 1
0
 void Die()
 {
     amscript.playDie(source);//audio
     anim.SetTrigger("death");
     this.transform.GetChild(2).gameObject.SetActive(false);
     agent.SetDestination(this.transform.position);
     Destroy(this.gameObject, 2f);
 }
Ejemplo n.º 2
0
 void HandleDying()
 {
     amscript.playDie(source);//audio
     anim.SetTrigger("death");
     Dissapear();
     im.DisplayMessage(this.tag + " Has Diededed!");
     PlayersFollow cameraScript = Camera.main.GetComponent<PlayersFollow>();
     if(cameraScript.playerNumber > 1)
     {
         cameraScript.RemovePlayer(this.gameObject);
         
         
     }
 }