示例#1
0
        /// <summary>
        /// Reation to button-like input
        /// </summary>
        /// <param name="_deck"></param>
        public void OnInputDonwAndUpRecived(DeckController _deck)
        {
            if (IsPaused)
            {
                return;
            }

            if (_deck.deckType == DeckController.DeckType.Main)
            {
                int amount = DrawThreeRule ? 3 : 1;
                for (int i = 0; i < amount; i++)
                {
                    _deck.DrawCard(false, true);
                    _deck.TransferTopCard(DeckDrawnCards);
                }
                //It stores a move of "draw" by the main deck. Not sure if requested
                //GameManager.I.MoveCtrl.RecordMove(0, DeckDrawnCards.GetTopCard(), _deck, DeckDrawnCards);
            }
            //Previous system where player has to flip the card by himself
            //if(_deck.deckType == DeckController.DeckType.Column)
            //{
            //    if(!_deck.IsTopCardFrontSide)
            //        _deck.DrawCard(true, true);
            //}
        }
示例#2
0
        /// <summary>
        /// Give starting cards
        /// One front faced and the others down faced
        /// </summary>
        /// <param name="_dCtrl"></param>
        /// <param name="_amount"></param>
        public void GiveStartingCards(DeckController _dCtrl, short _amount)
        {
            while (_amount > 1)
            {
                DeckMain.DrawCard(false, false);
                DeckMain.TransferTopCard(_dCtrl);
                _amount--;
            }

            if (_amount == 1)
            {
                DeckMain.DrawCard(false, true);
                DeckMain.TransferTopCard(_dCtrl);
                return;
            }

            return;
        }