Example #1
0
 public override void Interact(GameObject player)
 {
     player.GetComponent <PlayerController>().Freeze();
     player.GetComponent <PlayerController>().SetInvincible(true);
     gc.teleportTarget = destName;
     tc.LoadSceneFade(destScene);
 }
Example #2
0
    void Start()
    {
        tc = GetComponent <TransitionController>();
        if (SceneManager.GetActiveScene().name == "start")
        {
            tc.LoadSceneFade("Tutorial");
            teleportTarget = "startPoint";
        }

        gameCheckpoints = new List <string>();
        uc = GetComponent <UIController>();
    }
Example #3
0
 public void Respawn()
 {
     pc.Freeze();
     if (SceneManager.GetActiveScene().name.Equals(playerRespawnScene))
     {
         pc.transform.position = playerRespawnPoint;
         pc.Respawn();
     }
     else
     {
         //this means save point is in another scene, when scene transitions are a thing then load it based on the path
         //and then move the player to the last respawn point
         tc.LoadSceneFade(playerRespawnScene);
         toRespawn = true;
     }
 }