Exemple #1
0
        public void Pulse()
        {
            GameState state = (GameState)oriMemory.GetGameState();

            bool isInGame       = CheckInGame(state);
            bool isInGameWorld  = CheckInGameWorld(state);
            bool isStartingGame = CheckStartingNewGame(state);

            UpdateInGame(isInGame);
            UpdateStartGame(isStartingGame);
            UpdateScenes();

            if (isInGameWorld)
            {
                UpdateMap();
                int pSein = oriMemory.GetSein();
                if (pSein != 0 && (DateTime.Now >= lostSein))
                {
                    UpdatePosition();
                    UpdateEvents();
                    UpdateAbilities();
                    UpdateSein();
                }
                else if (pSein == 0)
                {
                    lostSein = DateTime.Now.AddMilliseconds(500);
                }
            }

            oriMemory.ClearPointerCache();
        }