Пример #1
0
 private void ServerComponentOnConnectionStausChanged(object sender, TcpConnectionStatusEventArgs e)
 {
     if (e.Status == TcpConnectionStatus.Disconnected)
     {
         var vars = _ioc.Get <RealmRuntimeVariables>();
         vars.MessageOnExit = "Server connection was interrupted. " + _serverComponent.LastErrorText;
         StatesManager.ActivateGameState("MainMenu");
     }
 }
Пример #2
0
        private void CheckForLoginStartUp()
        {
            if (_systemComponentInitialized && _slideShowFinished)
            {
                StatesManager.DeactivateSwitchComponent = true;
                if (StatesManager.ActivateGameState("SystemComponents", true))
                {
                    StatesManager.ForceCurrentState(this);

                    StatesManager.DeactivateSwitchComponent = false;

                    while (string.IsNullOrEmpty(_nextState))
                    {
                        Thread.Sleep(100);
                    }

                    StatesManager.ActivateGameStateAsync(_nextState);
                }
                else
                {
                    logger.Error("Initialization of startUp synchro problem !");
                }
            }
        }