Пример #1
0
 protected override void MyTurn()
 {
     base.MyTurn();
     cardsCount = MyCard.Count;
     usedCount  = TrashCard.Count;
     if (defens > 0)
     {
         defensPower = defens;
         DefensUI.SetDefens(defensPower);
         DefensUI.gameObject.SetActive(true);
     }
     else
     {
         DefensUI.gameObject.SetActive(false);
     }
 }
Пример #2
0
    protected override void Action()
    {
        switch (my)
        {
        case MYSTATE.NONE:
            MyTurn();
            if (isAttack)
            {
                my       = MYSTATE.ATTACK;
                isAttack = false;
                attack.gameObject.SetActive(false);
                defens.gameObject.SetActive(true);
            }
            else
            {
                my       = MYSTATE.DEFENS;
                isAttack = true;
                attack.gameObject.SetActive(true);
                defens.gameObject.SetActive(false);
            }
            break;

        case MYSTATE.ATTACK:
            Player.inst.LoseHp(attackPower);
            my = MYSTATE.END;
            StartCoroutine(WaitTime());
            break;

        case MYSTATE.DEFENS:
            defensPower = 5;
            DefensUI.SetDefens(defensPower);
            DefensUI.gameObject.SetActive(true);
            my = MYSTATE.END;
            StartCoroutine(WaitTime());
            break;

        case MYSTATE.END:
            break;
        }
    }