예제 #1
0
        protected override void Update(GameTime gameTime)
        {
            PerfMon.UpdateStarted();
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            for (var i = 0; i < s_GameObjects.Count; i++)
            {
                s_GameObjects[i].Update(gameTime);
            }

            base.Update(gameTime);
            PerfMon.UpdateFinished();
        }
예제 #2
0
        protected override void Update(GameTime gameTime)
        {
            PerfMon.UpdateStarted();
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            var deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds;

            foreach (var gameObject in s_GameObjects)
            {
                gameObject.Update(deltaTime);
            }

            base.Update(gameTime);
            PerfMon.UpdateFinished();
        }
예제 #3
0
        protected override void Update(GameTime gameTime)
        {
            PerfMon.UpdateStarted();

            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            var deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds;

            this.moveSystem.Update(deltaTime);
            this.velocityModifierSystem.Update(deltaTime);

            base.Update(gameTime);

            PerfMon.UpdateFinished();
        }