private void OpenCharacter(CharacterCard card) { ulong price = GameData.GetCharacterInfo(card.Character).Price; GameData.Instance.CurrentGameinfo.Coins -= price; ChangePrice(GameData.Instance.CurrentGameinfo.Coins.ToString(), ((-1) * (int)price).ToString()); card.IsOpen = true; GameData.UnlockCharacter(card.Character); InfoToCard(card); ScrollMover.Instance().ActivateCurrentCard(); }
public void ButtonPressed() { ScrollMover instance = ScrollMover.Instance(); if (instance == null || instance.ActiveCard == null) { return; } if (instance.ActiveCard.IsOpen) { StartGame(); } else { TryToBuyCharacter(instance.ActiveCard); } }
public void StartGame() { GameData.Instance.CurrentGameinfo.CurrentCharacter = ScrollMover.Instance().ActiveCard.Character; SceneManager.LoadGame(); }