public void RespawnPlayer() { playerRootTransform.GetComponentInChildren <PlayerHealthPoints>().MaxOutHealth(); playerRootTransform.gameObject.SetActive(true); playerRootTransform.position = respawnPosition.position; room.DestroyElements(); }
private void OnTriggerEnter(Collider other) { //se for o player //myRoom.DespawnItens //nextRoom.SpawnItens //lockar movimentação do player e tocar animação if (other.tag == "Player") { myRoom.DestroyElements(); nextRoom.SpawnElements(); nextRoom.virtualCamera.Priority = 1; myRoom.virtualCamera.Priority = 0; nextDoor.TeleportPlayerHere(other.transform); } }