示例#1
0
 void Awake()
 {
     hp          = 40;
     attackPower = 5;
     isAttack    = true;
     my          = MYSTATE.NONE;
     type        = TYPE.TOPAZ;
 }
示例#2
0
    public override void EndTurn()
    {
        my = MYSTATE.NONE;
        GameManager.instance.playerTurn = true;
        GameManager.instance.cost       = 3;
        Player.inst.DrawCard();
        Player.inst.defens = 0;
        Vector3 scale = transform.localScale;

        scale.x = 0.8f;
        scale.y = 0.8f;
        transform.localScale = scale;
    }
示例#3
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;
        }
    }