Esempio n. 1
0
    public void OpenDoor()
    {
        if (doorDeck.Count == 0)
        {
            return;
        }

        Card card = doorDeck[0];

        doorDeck.RemoveAt(0);
        doorDeckCountText.text = doorDeck.Count + " Doors";

        bool isMonster = card.cardType == Card.CardType.MONSTER;

        if (isMonster)
        {
            warTable.StartFight(card);
        }
        else
        {
            warTable.OpenCard(card);
        }

        turnController.OpenDoor(isMonster);
        Server.Instance.Send_OpenDoor(turnController.CurPlayerTurnNum, card.id, isMonster);
    }