public static void OnWorldDisconnect() { if (GameHooks.WorldDisconnect != null) { GameHooks.WorldDisconnect(); } }
public static bool OnGetKeyState() { if (GameHooks.GetKeyState == null) { return(false); } HandledEventArgs handledEventArgs = new HandledEventArgs(); GameHooks.GetKeyState(handledEventArgs); return(handledEventArgs.Handled); }
private static void GameHooks_Update() { if (GameHooks.oldGameMenu != Main.gameMenu) { GameHooks.oldGameMenu = Main.gameMenu; if (Main.gameMenu) { GameHooks.OnWorldDisconnect(); } else { GameHooks.OnWorldConnect(); } GameHooks.IsWorldRunning = !Main.gameMenu; } }
public static void OnInitialize(bool pre) { if (pre) { if (GameHooks.Initialize != null) { GameHooks.Initialize(); return; } } else { if (GameHooks.PostInitialize != null) { GameHooks.PostInitialize(); } } }
public static void OnUpdate(bool pre) { if (pre) { if (GameHooks.Update != null) { GameHooks.Update(); return; } } else { if (GameHooks.PostUpdate != null) { GameHooks.PostUpdate(); } } }