/** * Allocate a physics space and start physics. * <p> * Physics starts automatically after the state is attached. To start it * sooner, invoke this method. */ public void startPhysics() { if (initialized) { return; } switch (threadingType) { case PARALLEL: boolean success = startPhysicsOnExecutor(); assert success; assert pSpace != null; break; case SEQUENTIAL: pSpace = new PhysicsSpace(worldMin, worldMax, broadphaseType); pSpace.addTickListener(this); break; default: throw new IllegalStateException(threadingType.toString()); } initialized = true; }
/** * Allocate a physics space and start physics. * <p> * Physics starts automatically after the state is attached. To start it * sooner, invoke this method. */ public void startPhysics() { if (initialized) { return; } switch (threadingType) { case PARALLEL: boolean success = startPhysicsOnExecutor(); assert success; assert pSpace != null; break; case SEQUENTIAL: pSpace = new PhysicsSpace(worldMin, worldMax, broadphaseType); pSpace.addTickListener(this); break; default: throw new IllegalStateException(threadingType.toString()); } initialized = true; }
/** * Allocate a physics space and start physics. * <p> * Physics starts automatically after the state is attached. To start it * sooner, invoke this method. */ public void startPhysics() { if (initialized) { return; } switch (threadingType) { case PARALLEL: boolean success = startPhysicsOnExecutor(); assert success; assert pSpace != null; break; case SEQUENTIAL: pSpace = new PhysicsSpace(worldMin, worldMax, broadphaseType); pSpace.addTickListener(this); break; default: throw new IllegalStateException(threadingType.toString()); } initialized = true; }