示例#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();
 }