@Override
    public void stateAttached(AppStateManager stateManager) {
        super.stateAttached(stateManager);
        if (!isRunning) {
            startPhysics();
        }
        if (threadingType == ThreadingType.PARALLEL) {
            PhysicsSpace.setLocalThreadPhysicsSpace(pSpace);
        }
        if (debugEnabled) {
            debugAppState = new BulletDebugAppState(pSpace);
            stateManager.attach(debugAppState);
        }
    }
Transition this state from detached to initializing. Should be invoked
only by a subclass or by the AppStateManager.

@param stateManager (not null)
jme3-jbullet/src/main/java/com/jme3/bullet/BulletAppState.java