Exemplo n.º 1
0
        private static async Task WaitUntilInMenu()
        {
            var timeout = 30000;
            var wait    = 1000;
            var elapsed = 0;

            while (!Client.IsInMenu())
            {
                await Task.Delay(wait);

                elapsed += wait;
                if (elapsed >= timeout)
                {
                    return;
                }
            }
        }
Exemplo n.º 2
0
        private static async Task WaitUntilInMenu()
        {
            var timeout = 30000;
            var wait    = 1000;
            var elapsed = 0;

            while (!Client.IsInMenu())
            {
                await Task.Delay(wait);

                elapsed += wait;
                if (elapsed >= timeout)
                {
                    Logger.Debug($"EndGame: InMenu wait timed out after {timeout / 1000}s");
                    return;
                }
            }
        }