Example #1
0
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }
            if (WKeyboard.KeyClick(Keys.Tab))
            {
                editorGUIEnabled = !editorGUIEnabled;
            }

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

            client.AcceptPacketsWhileAvailable();

            if (currentTool != null)
            {
                currentTool.Update();
            }
            WMouse.Update();
            WKeyboard.Update();
            gizmoWorld.Update(deltaTime);
            world.Update(deltaTime);
            userGUI.Update(deltaTime);
            if (editorGUIEnabled)
            {
                editorGUI.Update(deltaTime);
            }

            base.Update(gameTime);
        }