예제 #1
0
 public void SetFightBack(Transform atk, Transform target)
 {
     Attacker   = atk;
     Target     = target;
     attackable = atkCal.Attackable(atk, target);
     // init fight back
     if (attackable)
     {
         turningHead.SetTurnHeadSequence(Attacker, target.GetComponent <CharacterSelect>().getMapPosition(), true, true, false);
         print("really fight back");
     }
 }
예제 #2
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);
    }