public void Update(GameTime gameTime, bool cutScene, int newGameState)
        {
            Player.Update(gameTime, cutScene);
            CheckActive();
            if (!cutScene)
            {
                if (isActive && gameMode.BetweenLevelsTimer.IsFinished)
                {
                    UpdateSpawnHandlers(gameTime);
                }

                if (newGameState != EventOperator.CUT_SCENE_STATE)
                {
                    gameMode.Update(gameTime);
                }
                ProgressGame(gameTime);
            }
            Drops.Update(gameTime);
            Enemies.Update(gameTime);
            Projectiles.Update(gameTime);
            HandleAllCollisions();
        }
Beispiel #2
0
        //--------------------------------------------------

        /// <summary>
        /// Updates all field objects.
        /// </summary>
        public virtual void Update()
        {
            Mobs.Update();

            Reactors.RedistributeLife();

            Drops.Update();

            if (tFieldTimerExpiration != DateTime.MinValue && tFieldTimerExpiration.SecondsUntilEnd() <= 0)
            {
                OnClockEnd();
            }

            foreach (var user in Users)
            {
                user.Update(this);
            }

            // less taxing to check item id cuz it gets reset when the effect is over
            if (CurrentWeather.nItemID > 0 && CurrentWeather.StartTime.AddedSecondsExpired(CurrentWeather.Duration))
            {
                CurrentWeather.Clear();
            }

            MiniRooms.Update();
            Kites.Update();
            TownPortals.Update();
            OpenGates1.Update();
            OpenGates2.Update();
            AffectedAreas.Update();
            Summons.Update();

            if (Template.DecHP > 0 || Template.DecMP > 0)
            {
                // TODO
                // CUserLocal::OnNotifyHPDecByField(this, iPacket);
            }
        }