Пример #1
0
 public static void Update()
 {
     try {
         var gs = InterOp.get_game_state();
         if (gs == GameState.TitleScreen)
         {
             UberStateController.SkipListeners = true;
             if (TitleScreenCallback != null)
             {
                 OnTitleScreen();
             }
         }
         else if (gs == GameState.Game)
         {
             UberStateController.SkipListeners = false;
             UberStateController.Update();
             if (InputUnlockCallback != null && InterOp.player_can_move())
             {
                 OnInputUnlock();
             }
             SeedController.UpdateGoal();
             TrackFileController.Update();
         }
         AHK.Tick();
         BonusItemController.Update();
         DiscordController.Update();
         Client.Update();
     } catch (Exception e) {
         Log($"Update error: {e.Message}\n{e.StackTrace}");
     }
 }
Пример #2
0
        public static void Update()
        {
            try {
                RVAFinder.Update();
                if (!Memory.IsHooked)
                {
                    Memory.HookProcess();
                }

                if (Memory.GameState == GameState.TitleScreen)
                {
                    if (TitleScreenCallback != null)
                    {
                        OnTitleScreen();
                    }
                    UberStateController.SkipListenersNextUpdate = true;
                }
                else if (Memory.GameState == GameState.Game)
                {
                    UberStateController.Update();
                    if (InputUnlockCallback != null && InterOp.player_can_move())
                    {
                        OnInputUnlock();
                    }
                    SeedController.UpdateGoal();
                    TrackFileController.Update();
                }
                AHK.Tick();
            } catch (Exception e) {
                Log($"Update error: {e.Message}\n{e.StackTrace}");
            }
        }