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); }
public void OpenDoor(int cardId, bool isMonster) { CardInfo cardInfo = CreateCard(cardId); cardInfo.cardMovment.State = CardMovment.CardState.OPEN; if (isMonster) { warTable.StartFight(cardInfo); } else { warTable.AddCard(cardInfo, true); } }