Пример #1
0
    bool AttackCommand(Transform chess)
    {
        bool attackable = false;

        chess.GetComponent <CharacterSelect>().AttackRangeList.Clear();
        Transform sel = decisions.GetAttackTarget(chess);

        if (sel != null)
        {
            AttackCalFX attackerCal = Camera.main.GetComponent <AttackCalFX>();
            bool        critiq      = attackerCal.CalcriticalHit(chess, AttackType.physical);
            TurnHead    th          = Camera.main.GetComponent <TurnHead>();
            th.SetTurnHeadSequence(chess, sel, true, false, critiq);
            attackable = true;
        }
        else
        {
            attackable = false;
        }

        return(attackable);
    }