Пример #1
0
 public void NextGameCharacter()
 {
     if (gameDataObject.partyList.Count > 0)
     {
         if (curGameCharacter.Equals(gameDataObject.playerGameCharacter))
         {
             curGameCharacter = gameDataObject.partyList[0];
         }
         else
         {
             var partyIndex = gameDataObject.partyList.IndexOf(curGameCharacter);
             partyIndex++;
             if (partyIndex >= gameDataObject.partyList.Count)
             {
                 curGameCharacter = gameDataObject.playerGameCharacter;
             }
             else
             {
                 curGameCharacter = gameDataObject.partyList[partyIndex];
             }
         }
         gameDataObject.SelectCharacter(curGameCharacter);
         UpdateUI();
     }
 }
Пример #2
0
 private void loadGameData()
 {
     gameDataObject = GameObject.FindObjectOfType <GameDataObject>();
     gameDataObject.SelectCharacter(gameDataObject.playerGameCharacter);
     selectedGameCharacter = gameDataObject.getSelectedCharacter();
 }