private async Task <bool> ClearingArea() { if (await ClearAreaCoroutine.Clear(_startingPosition, 60)) { State = States.UsingTownPortal; } return(false); }
private async Task <bool> ClearingArea() { StatusText = "[Waypoint] Clearing area"; if (await ClearAreaCoroutine.Clear(_startingPosition, 45)) { State = States.TogglingWaypointMap; } return(false); }
public static async Task <bool> Clear(Vector3 center, int radius, bool forceMoveAround = false, bool returnToCenter = true) { if (_clearAreaCoroutine == null || radius != _clearRadius || forceMoveAround != _clearForce || returnToCenter != _clearReturnToCenter) { _clearCenter = center; _clearRadius = radius; _clearForce = forceMoveAround; _clearReturnToCenter = returnToCenter; _clearAreaCoroutine = new ClearAreaCoroutine(center, radius, forceMoveAround, returnToCenter); } if (await _clearAreaCoroutine.GetCoroutine()) { _clearAreaCoroutine = null; return(true); } return(false); }