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(); }
private new void Awake() { base.Awake(); MenuPage = this; if (!LevelsState.IsLevelAvailible(0)) { LevelsState.UnlockLevel(0); } soundSettingsButton.onClick.AddListener(OpenSoundSettings); newGameButton.onClick.AddListener(NewGame); }
private void OpenOrBuy() { if (LevelsState.IsLevelAvailible(levelId)) { OpenLevel(); } else { if (Purse.RemoveMoney(priceCoin, priceDiamond)) { LevelsState.UnlockLevel(levelId); Unlock(); OpenLevel(); } } }