private static void Kick(Exception exception) { if (API.LoggedIn) { API.LoggedIn = false; SessionStarted = false; Status = "Idle"; if (Core.Player.IsGameJoltSave) { BaseConnectScreen.Setup(Screen.CreateConnectScreen(BaseConnectScreen.Modes.Disconnect, "Disconnected", "The GameJolt server doesn't respond.", Core.CurrentScreen)); } } }
public static void Update(GameTime gameTime) { GameTime = gameTime; KeyBoardHandler.Update(); ControllerHandler.Update(); BaseConnectScreen.UpdateConnectSet(); if (!GameInstance.IsActive) { if (CurrentScreen.CanBePaused) { Core.SetScreen(Screen.CreatePauseScreen(CurrentScreen)); } } else { if (KeyBoardHandler.KeyPressed(KeyBindings.Escape) || ControllerHandler.ButtonDown(Buttons.Start)) { CurrentScreen.EscapePressed(); } } CurrentScreen?.Update(gameTime); if (CurrentScreen.CanChat) { if (KeyBoardHandler.KeyPressed(KeyBindings.Chat) || ControllerHandler.ButtonPressed(Buttons.RightShoulder)) { if (BaseJoinServerScreen.Online || Player.SandBoxMode || GameController.IS_DEBUG_ACTIVE) { SetScreen(Screen.CreateChatScreen((CurrentScreen))); } } } MainGameFunctions.FunctionKeys(); MusicManager.Update(gameTime); GameMessage.Update(); Controls.MakeMouseVisible(); MouseHandler.Update(); LoadingDots.Update(); ForcedCrash.Update(); ServersManager.Update(); }
public static void Setup(BaseConnectScreen connectScreen) { TempConnectScreen = connectScreen; NeedToSwitch = true; }