Пример #1
0
    // Use this for initialization
    void Start()
    {
        //switch room after delay if there is one
        // if (delay > 0){
        //  Debug.Log("gonna switch rooms automatically");
        //  StartCoroutine(LoadLevelAfterDelay(delay));
        // }

        //if current floor index is < 0, you're on the results screen
        //and you'll want to transition to the first level
        if (thisFloorNum == -1)
        {
            nextLevel = DungeonList.GetFloorNameWithDifficulty(0);             //DungeonList.arr_floorInfo[0];
        }
        else if (thisFloorNum == -2)
        {
            nextLevel = DungeonList.dungeon_results.floorName;
        }
        //if you are on the last floor available,
        //you'll want to transition to the results screen
        //if you're on the first floor and you only have that floor unlocked
        //curMaxFloor = 0
        //thisFloorNum + 1 = 1
        //so the next floor should be results
        else if (thisFloorNum + 1 >= DungeonList.curMaxFloor + 1)
        {
            nextLevel = DungeonList.dungeon_upgrademenu.floorName;
        }
        //otherwise, transition to the next level
        else
        {
            nextLevel = DungeonList.GetFloorNameWithDifficulty(thisFloorNum + 1);
        }
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     //Debug.Log("Start intro screen change");
     if (introPart == 1)
     {
         if (introIndex + 1 >= DungeonList.maxNumIntro1Scenes)
         {
             nextFloor = DungeonList.arr_tutorialFloorNames[0];
         }
         else
         {
             nextFloor = DungeonList.arr_intro1FloorNames[introIndex + 1];
         }
     }
     else
     {
         if (introIndex + 1 >= DungeonList.maxNumIntro2Scenes)
         {
             nextFloor = DungeonList.GetFloorNameWithDifficulty(0);                 //DungeonList.arr_floorInfo[0].floorName;
         }
         else
         {
             nextFloor = DungeonList.arr_intro2FloorNames[introIndex + 1];
         }
     }
 }