Example #1
0
 // rotate through showing a preview of the item
 public void RotateStoreItem(bool next)
 {
     if (storeSelectingPowerUp)
     {
         storeItemIndex = (storeItemIndex + (next ? 1 : -1)) % (int)PowerUpTypes.None;
         if (storeItemIndex < 0)
         {
             storeItemIndex = (int)PowerUpTypes.None - 1;
         }
     }
     else
     {
         storeItemIndex = (storeItemIndex + (next ? 1 : -1)) % dataManager.GetCharacterCount();
         if (storeItemIndex < 0)
         {
             storeItemIndex = dataManager.GetCharacterCount() - 1;
         }
         GameManager.instance.SelectCharacter(storeItemIndex);
     }
     RefreshStoreGUI();
     RefreshStoreItem();
 }