Пример #1
0
        private void Mulligan(string player)
        {
            List <Transform> temp           = new List <Transform>();
            HandController   handController = this._enemyHandController;
            DeckController   deckController = this._enemyDeckController;

            if (player == "Player")
            {
                handController = this._playerHandController;
                deckController = this._playerDeckController;
            }
            foreach (Transform card in handController.cards)
            {
                temp.Add(card);
            }

            foreach (Transform card in temp)
            {
                handController.RemoveCard(card);
                deckController.ReplaceCard(card);
            }

            // Draw 7 cards
            for (int i = 0; i < 7; i++)
            {
                handController.AddCard(deckController.DrawCard());
            }

            this.ClickButton(player);
        }
Пример #2
0
 void Awake()
 {
     this._battlefield         = GameObject.Find("Battlefield").GetComponent <Battlefield>();
     this._handController      = null;
     this._graveyardController = null;
     this.boardLocation        = Location.DECK;
     this.cardText             = this.GetComponentInChildren <Text>();
 }
Пример #3
0
 void Awake()
 {
     this._nextState        = GameObject.Find("Camera").GetComponent <PlayerTurnState>();
     this._playerController = GameObject.Find("EnemyHand").GetComponent <PlayerController>();
     this._handController   = GameObject.Find("EnemyHand").GetComponent <HandController>();
     this._deckController   = GameObject.Find("EnemyDeckPanel/EnemyDeck").GetComponent <DeckController>();
     this._turnPanelText    = GameObject.Find("TurnPanel/Text").GetComponent <Text>();
 }
Пример #4
0
 void Awake()
 {
     this._battlefield         = GameObject.Find("Battlefield").GetComponent <Battlefield>();
     this._gameState           = GameObject.Find("Camera").GetComponent <GameStateController>();
     this._handController      = null;
     this._graveyardController = null;
     this._unit           = this.GetComponent <Unit>();
     this._cardController = this.GetComponent <CardController>();
     this.square          = null;
 }
Пример #5
0
 public void Init(Owner owner)
 {
     this.ownedBy = owner;
     if (owner == Owner.PLAYER)
     {
         this._handController      = GameObject.Find("PlayerHand").GetComponent <HandController>();
         this._graveyardController = GameObject.Find("PlayerGraveyardPanel/PlayerGraveyard").GetComponent <GraveyardController>();
     }
     else
     {
         this._handController      = GameObject.Find("EnemyHand").GetComponent <HandController>();
         this._graveyardController = GameObject.Find("EnemyGraveyardPanel/EnemyGraveyard").GetComponent <GraveyardController>();
     }
 }
Пример #6
0
 void Awake()
 {
     this._nextState             = GameObject.Find("Camera").GetComponent <MainPhase1>();
     this._gameState             = GameObject.Find("Camera").GetComponent <GameStateController>();
     this._playerDeckController  = GameObject.Find("PlayerDeckPanel/PlayerDeck").GetComponent <DeckController>();
     this._enemyDeckController   = GameObject.Find("EnemyDeckPanel/EnemyDeck").GetComponent <DeckController>();
     this._playerHandController  = GameObject.Find("PlayerHand").GetComponent <HandController>();
     this._enemyHandController   = GameObject.Find("EnemyHand").GetComponent <HandController>();
     this._phasePanelText        = GameObject.Find("PhasePanel/Text").GetComponent <Text>();
     this._playerMulliganButton  = GameObject.Find("PlayerMulliganButton").transform;
     this._playerKeepCardsButton = GameObject.Find("PlayerKeepCardsButton").transform;
     this._enemyMulliganButton   = GameObject.Find("EnemyMulliganButton").transform;
     this._enemyKeepCardsButton  = GameObject.Find("EnemyKeepCardsButton").transform;
 }
Пример #7
0
 public void Init(Owner owner)
 {
     this.ownedBy = owner;
     if (this.ownedBy == Owner.PLAYER)
     {
         this._handController      = GameObject.Find("PlayerHand").GetComponent <HandController>();
         this._graveyardController = GameObject.Find("PlayerGraveyardPanel/PlayerGraveyard").GetComponent <GraveyardController>();
     }
     else
     {
         this._handController      = GameObject.Find("EnemyHand").GetComponent <HandController>();
         this._graveyardController = GameObject.Find("EnemyGraveyardPanel/EnemyGraveyard").GetComponent <GraveyardController>();
     }
     this.canMove = this.canAttack = this.isExhausted = false;
 }