Exemplo n.º 1
0
 private void NewGame()
 {
     Purse.RemoveAllMoney();
     for (int i = 0; i < LevelPages.Length; i++)
     {
         LevelsState.AddFreeSpin(i, 10);
         LevelsState.LockLevel(i);
     }
     LevelsState.UnlockLevel(0);
     Close();
     StartScreenPage.Open();
 }
Exemplo n.º 2
0
    private new void Awake()
    {
        base.Awake();
        MenuPage = this;

        if (!LevelsState.IsLevelAvailible(0))
        {
            LevelsState.UnlockLevel(0);
        }
        soundSettingsButton.onClick.AddListener(OpenSoundSettings);
        newGameButton.onClick.AddListener(NewGame);
    }
Exemplo n.º 3
0
 private void OpenOrBuy()
 {
     if (LevelsState.IsLevelAvailible(levelId))
     {
         OpenLevel();
     }
     else
     {
         if (Purse.RemoveMoney(priceCoin, priceDiamond))
         {
             LevelsState.UnlockLevel(levelId);
             Unlock();
             OpenLevel();
         }
     }
 }