Exemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         if (tokenRequired == "")
         {
             LoadUtils.LoadNewExplorationLevel(levelName, spawnPosition);
         }
         else if (ConversationTrigger.GetToken(tokenRequired))
         {
             LoadUtils.LoadNewExplorationLevel(levelName, spawnPosition);
         }
     }
 }
Exemplo n.º 2
0
    // When loading a save, this script checks to see if the player should be in a different level.
    // If they should be, it relocates them.

    void Start()
    {
        // Later levels should be higher in this list.
        if (ConversationTrigger.GetToken("reachedLevel_CityVault"))
        {
            LoadUtils.LoadNewExplorationLevel("CityVault", new Vector3(0, 5, 0));
            return;
        }

        if (ConversationTrigger.GetToken("reachedLevel_RuinedCity"))
        {
            LoadUtils.LoadNewExplorationLevel("RuinedCity", new Vector3(0, 5, 0));
            return;
        }
        else
        {
            transform.position = new Vector3(-160, -32, 60);
            Debug.Log("transformierung");
        }
    }