Hi,
I am confused about the need for a scheduler when you can call the Fighter.Cancel() function from PlayerController class.
bool InteractWithMovement()
{
RaycastHit hit;
bool hasHit = Physics.Raycast(GetMouseRay(), out hit);
if (hasHit)
{
if (Input.GetMouseButton(0))
{
GetComponent<Mover>().MoveTo(hit.point);
**GetComponent<Fighter>().Cancel();**
}
return true;
}
return false;
}
Am I missing anything? I’d really appreciate it if you could make this clear to me.