예제 #1
0
 private void Spin()
 {
     foreach (var line in lines)
     {
         line.Hide();
     }
     if (IsSpinning() || isSpin)
     {
         return;
     }
     StartCoroutine(IsSpinCoroutine());
     if (freeSpin > 0)
     {
         SpecialEventsStore.SetDidTenFreeSpins(levelId);
         Achivements.SetFreeSpinCounter();
         Achivements.SetMaxBetCounter();
         bet = MAX_BET;
         LevelsState.RemoveFreeSpin(levelId);
         freeSpin = freeSpin;
         AudioManager.Instance.ScrolingSlotSound();
         StartCoroutine(SpinCoroutine());
     }
     else if (coins >= bet)
     {
         if (bet == MAX_BET)
         {
             Achivements.SetMaxBetCounter();
         }
         coins -= bet;
         Purse.RemoveMoney(bet, 0);
         AudioManager.Instance.ScrolingSlotSound();
         StartCoroutine(SpinCoroutine());
     }
 }
예제 #2
0
 private void OpenOrBuy()
 {
     if (LevelsState.IsLevelAvailible(levelId))
     {
         OpenLevel();
     }
     else
     {
         if (Purse.RemoveMoney(priceCoin, priceDiamond))
         {
             LevelsState.UnlockLevel(levelId);
             Unlock();
             OpenLevel();
         }
     }
 }