//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- // \ 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(); } } } }
public void clearPoI() { moveTarget = null; taken = false; }
public void assignMoveTarget(CheckForGrounded mt) { moveTarget = mt; taken = true; }