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); }
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); } }