Problem with AppState

Hey!

I got a small problem with my game AppState. I got main Game.java class (http://pastebin.com/HzJGquqR) which extends SimpleApplication and call GameState.java(http://pastebin.com/nSrtQpXH) to run. GameState extends AbstractAppState. And all works but as you can see i had to comment all lines with: mouseInput, inputManager, cam, flyCam, audioRenderer, player because when i leave them i get error NullPointerExcept. - because they DONT EXIST.

And here’s a question: how fix that? When class extend SimpleApplication there’s no problem with that, is that all defined in SimpleApplication class? How i can create them without extending this SimpleApplication?

Pass them along when you create the app state or get them from Application when the app state is initialized.

http://www.javabeginner.com/

So they all are avaible from Application.class?

http://hub.jmonkeyengine.org/javadoc/com/jme3/app/Application.html#getInputManager()
http://hub.jmonkeyengine.org/javadoc/com/jme3/app/Application.html#getCamera()

…etc…

Knowing where the javadoc is is like a super power I guess.