Beispiel #1
0
    public void PlayCard(GameObject cardObj, ZoneController zc)
    {
        if (cardObj.GetComponent <DragHandler>().pc.isAi == TurnSystem.Instance.isYourTurn)
        {
            return;                                                                               //can not play card in oppo's turn
        }
        if (zc.pc.isAi == TurnSystem.Instance.isYourTurn)
        {
            return;                                               //playing card in enemy's zone is forbided except spy(not implement yet)
        }
        DragHandler dragHandler = cardObj.GetComponent <DragHandler>();

        dragHandler.setNewParent();
        cardObj.GetComponent <MonsterCardController>().PlayCard();
        zc.UpdatePower();
    }