Example #1
0
 public static void OnWorldDisconnect()
 {
     if (GameHooks.WorldDisconnect != null)
     {
         GameHooks.WorldDisconnect();
     }
 }
Example #2
0
        public static bool OnGetKeyState()
        {
            if (GameHooks.GetKeyState == null)
            {
                return(false);
            }
            HandledEventArgs handledEventArgs = new HandledEventArgs();

            GameHooks.GetKeyState(handledEventArgs);
            return(handledEventArgs.Handled);
        }
Example #3
0
 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;
     }
 }
Example #4
0
 public static void OnInitialize(bool pre)
 {
     if (pre)
     {
         if (GameHooks.Initialize != null)
         {
             GameHooks.Initialize();
             return;
         }
     }
     else
     {
         if (GameHooks.PostInitialize != null)
         {
             GameHooks.PostInitialize();
         }
     }
 }
Example #5
0
 public static void OnUpdate(bool pre)
 {
     if (pre)
     {
         if (GameHooks.Update != null)
         {
             GameHooks.Update();
             return;
         }
     }
     else
     {
         if (GameHooks.PostUpdate != null)
         {
             GameHooks.PostUpdate();
         }
     }
 }