Exemplo n.º 1
0
 public void CardWasUsed(Player player, CardController card)
 {
     player.Cards.Remove(card.Card);
     Destroy(card);
     //todo state changes out of card mode immediately after using a card - desired?
     GameState.State = AllGameStates.MyTurn_Battleground;
 }
Exemplo n.º 2
0
 private List<ICardModel> dealCards(Player forPlayer)
 {
     var numCardsNeeded = Math.Max(Constants.NUM_CARDS_IN_HAND - forPlayer.Cards.Count, 0);
     var results = new List<ICardModel>();
     for (int i = 0; i < numCardsNeeded; i++)
     {
         results.Add(new CardExtraPower(forPlayer));
     }
     return results;
 }
Exemplo n.º 3
0
        void InitLevel()
        {
            var players = GameObject.FindGameObjectsWithTag("Player");
            Player1GameObject = players.First(p => p.name.ToLower() == "player1");
            Player2GameObject = players.First(p => p.name.ToLower() == "player2");
            player1 = Player1GameObject.GetComponent<Player>();
            player2 = Player2GameObject.GetComponent<Player>();
            GameState.LocalPlayer = NewGameInfo.LocalPlayerNumber == 1 ? player1 : player2;

            if(NewGameInfo.LocalPlayerNumber == NewGameInfo.NextUpPlayer)
            {
                StartLocalPlayerTurn();
            }

            ThisLevelInitialized = true;
        }
Exemplo n.º 4
0
 protected override void Start()
 {
     player = gameObject.GetComponent<Player>();
     player.ShotPowerDamage += SHOT_POWER_MODIFIER;
 }