Esempio n. 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;
        }
Esempio n. 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);
        }