public void RespawnPlayer()
 {
     playerRootTransform.GetComponentInChildren <PlayerHealthPoints>().MaxOutHealth();
     playerRootTransform.gameObject.SetActive(true);
     playerRootTransform.position = respawnPosition.position;
     room.DestroyElements();
 }
示例#2
0
    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);
        }
    }