示例#1
0
 public void Update(GameTime gameTime)
 {
     if (world.Enabled)
     {
         world.Step(Math.Min((float)gameTime.ElapsedGameTime.TotalMilliseconds * 0.001f, (1f / 30f)));
         debugview.Update(gameTime);
     }
 }
 public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
 {
     if (!coveredByOtherScreen && !otherScreenHasFocus && World != null)
     {
         // variable time step but never less then 30 Hz
         World.Step(Math.Min((float)gameTime.ElapsedGameTime.TotalMilliseconds * 0.001f, (1f / 30f)));
         DebugView.Update(gameTime);
     }
     base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
 }