//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    //                                                                      \ UPDATE FUNCTION ABOVE /
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    public void SetAttackType(AttackType type)
    {
        attackType = type;
        if (moveTarget)
        {
            CheckForGrounded mt = moveTarget.GetComponent <CheckForGrounded>();

            if (mt && targetToAttack && attackType == AttackType.SELECTED)
            {
                mt.AssignAttackTarget(targetToAttack.gameObject.transform);
            }
            else
            {
                if (mt)
                {
                    mt.StopAttacking();
                }
            }
        }
    }
Beispiel #2
0
 public void clearPoI()
 {
     moveTarget = null;
     taken      = false;
 }
Beispiel #3
0
 public void assignMoveTarget(CheckForGrounded mt)
 {
     moveTarget = mt;
     taken      = true;
 }