Пример #1
0
 public void clickOnTribes()
 {
     if (mapIsShown)
     {
         tribesMan.SetActive(false);
         mapIsShown = false;
     }
     else
     {
         if (handler.getPlayers().Count >= index)
         {
             index = handler.getPlayers().Count - 1;
         }
         if (handler.getPlayers().Count > index)
         {
             if (handler.getPlayers() [index] != null)
             {
                 TribesManStats temp = handler.getPlayers() [index];
                 speedText.text    = "" + temp.speed;
                 cookText.text     = "" + temp.cookingAbility;
                 resourceText.text = "" + temp.medicinAbility;
                 fightText.text    = "" + temp.fightingAbility;
                 name.text         = "" + temp.name;
                 role.text         = "Role: " + temp.role;
                 indexText.text    = (index + 1) + "/" + handler.getPlayers().Count;
             }
         }
         tribesMan.SetActive(true);
         mapIsShown = true;
     }
 }
Пример #2
0
 public void backPerson()
 {
     index--;
     if (index < 0)
     {
         index = handler.getPlayers().Count - 1;
     }
     if (index >= 0)
     {
         TribesManStats temp = handler.getPlayers() [index];
         speedText.text    = "" + temp.speed;
         cookText.text     = "" + temp.cookingAbility;
         resourceText.text = "" + temp.medicinAbility;
         fightText.text    = "" + temp.fightingAbility;
         name.text         = "" + temp.name;
         role.text         = "Role: " + temp.role;
         indexText.text    = (index + 1) + "/" + handler.getPlayers().Count;
     }
 }