@Override 
    public void stateAttached(AppStateManager stateManager) {
        this.stateManager = stateManager;
        for (AppStateEntry e : states.getArray()) {
            stateManager.attach(e.state);
        }
        this.attached = true;
    }
Since we manage attachmend/detachment possibly before
 initialization, we need to keep track of the stateManager we
 were given in stateAttached() in case we have to attach another
 child prior to initialization (but after we're attached).
 It's possible that we should actually be waiting for initialize
 to add these but I feel like there was some reason I did it this 
 way originally.  Past-me did not leave any clues.
jme3-core/src/main/java/com/jme3/app/state/CompositeAppState.java