Skip to content

Commit

Permalink
separates demo from library
Browse files Browse the repository at this point in the history
  • Loading branch information
capdevon committed Sep 17, 2024
1 parent 7cb3f64 commit 548c55d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public class TogglePhysicsDebugState extends BaseAppState implements ActionListe

private static final String TOGGLE_PHYSICS_DEBUG = "TOGGLE_PHYSICS_DEBUG";

private BulletAppState physics;
private BulletAppState bulletAppState;
private InputManager inputManager;

@Override
protected void initialize(Application app) {
this.physics = getState(BulletAppState.class, true);
this.bulletAppState = getState(BulletAppState.class, true);
this.inputManager = app.getInputManager();
}

Expand All @@ -44,8 +44,8 @@ protected void onDisable() {
@Override
public void onAction(String name, boolean isPressed, float tpf) {
if (name.equals(TOGGLE_PHYSICS_DEBUG) && isPressed) {
boolean debug = physics.isDebugEnabled();
physics.setDebugEnabled(!debug);
boolean debug = bulletAppState.isDebugEnabled();
bulletAppState.setDebugEnabled(!debug);
}
}

Expand Down

0 comments on commit 548c55d

Please sign in to comment.