예제 #1
0
        protected override void Update(GameTime gameTime)
        {
            KeyboardHandler.Update();

            if (KeyboardHandler.CurrentState.IsKeyDown(Keys.Escape))
                Exit();

            if (KeyboardHandler.Pressed.Contains(Keys.G))
                Gravity = (Gravity != Vector2.Zero) ? Vector2.Zero : NormalGravity;

            if (KeyboardHandler.Pressed.Contains(Keys.R))
                world = new World();

            world.Update(gameTime);

            base.Update(gameTime);
        }
예제 #2
0
        protected override void Initialize()
        {
            world = new World();

            base.Initialize();
        }