Example #1
0
  /**
   * we update the input controllers and some physic object if needed, then we update the physics
   * world and call updateGeometricstate() which happens in super.update().
   */
  @Override
  public void update(float tpf) {
    input.update(tpf);
    //		swing.update();

    if (movementInput.isEnabled()) {
      movementInput.update(tpf);
    }
    super.update(tpf);
  }
Example #2
0
  /** render the scene, draw bounds or physics if needed. */
  @Override
  public void render(float tpf) {
    super.render(tpf);
    if (showPhysics) {
      PhysicsDebugger.drawPhysics(
          getPhysicsSpace(), DisplaySystem.getDisplaySystem().getRenderer());
    }

    if (showBounds) {
      Debugger.drawBounds(getRootNode(), DisplaySystem.getDisplaySystem().getRenderer());
    }
  }