void OnTriggerStay(Collider trigger) { if (trigger.tag == "player") //If the player is in the trigger zone // Move the player to the X Y Z position on the map - True uses a time limit { char2D.respawn(respawnLocationX, respawnLocationY, respawnLocationZ, true); } }
void resetEvents() { char2D.respawn(playerRespawnX, playerRespawnY, playerRespawnX, false); //Set players location to X, Y, Z and do not use a delay timer(FALSE) invisWall.setWall(true); //Set invisible wall to true so the player can pass through //cletusAnimation.idleAnimation(); bossScene1.resetBattle(); //Reset the messaging script char2D.messageMode = false; //Pulls character out of message mode if it is enabled }
// Update is called once per frame void Update() { guiText.text = "Lives : " + lives.ToString(); // Display the text on screen if (lives == 0) { char2D.respawn(currentCheckpointX, currentCheckpointY, currentCheckpointZ, false); //Respawn character at X Y Z lives = 3; //Reset lives } }