예제 #1
0
        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();
        }
예제 #2
0
        public void ButtonPressed()
        {
            ScrollMover instance = ScrollMover.Instance();

            if (instance == null || instance.ActiveCard == null)
            {
                return;
            }
            if (instance.ActiveCard.IsOpen)
            {
                StartGame();
            }
            else
            {
                TryToBuyCharacter(instance.ActiveCard);
            }
        }
예제 #3
0
 public void StartGame()
 {
     GameData.Instance.CurrentGameinfo.CurrentCharacter = ScrollMover.Instance().ActiveCard.Character;
     SceneManager.LoadGame();
 }