示例#1
0
        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;
        }
示例#2
0
        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);
        }