Example #1
0
        private void onOperationCompleted(object sender, EventArgs e)
        {
            CurrentOperation.Succeed -= onOperationCompleted;
            CurrentOperation.Failed  -= onOperationCompleted;
            CurrentOperation.Dispose();
            CurrentOperation = null;

            if (mMainThread != Thread.CurrentThread || !mQueue.Any())
            {
                return;
            }
            dequeueAndExecute();
        }
Example #2
0
        public static void Shutdown()
        {
            if (IsInit)
            {
                GameLobbyJoinRequested?.Dispose();
                GameLobbyJoinRequested = null;

                CurrentOperation?.Dispose();
                CurrentOperation = null;

                SteamAPI.Shutdown();
                IsInit = false;
            }
        }
Example #3
0
        public static void Service()
        {
            SteamAPI.RunCallbacks();

            if (CurrentOperation?.Done ?? false)
            {
                if (CurrentOperation.Failed)
                {
                    CurrentOperation.OnFailed();
                }
                else
                {
                    CurrentOperation.OnSuccess();
                }
                CurrentOperation.Dispose();
                CurrentOperation = null;
            }
        }