public static async Task<bool> UseWaypoint(int waypointNumber) { if (_waypointCoroutine == null || _useWaypointWaypointNumber != waypointNumber) { _waypointCoroutine = new WaypointCoroutine(waypointNumber); _useWaypointWaypointNumber = waypointNumber; } if (await _waypointCoroutine.GetCoroutine()) { _waypointCoroutine = null; return true; } return false; }
public static async Task <bool> UseWaypoint(int waypointNumber) { if (_waypointCoroutine == null || _useWaypointWaypointNumber != waypointNumber) { _waypointCoroutine = new WaypointCoroutine(waypointNumber); _useWaypointWaypointNumber = waypointNumber; } if (await _waypointCoroutine.GetCoroutine()) { _waypointCoroutine = null; return(true); } return(false); }