|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.app.state.AppStateManager
public class AppStateManager
The AppStateManager
holds a list of AppState
s which
it will update and render.
When an AppState
is attached or detached, the
AppState.stateAttached(com.jme3.app.state.AppStateManager)
and
AppState.stateDetached(com.jme3.app.state.AppStateManager)
methods
will be called respectively.
The lifecycle for an attached AppState is as follows:
Constructor Summary | |
---|---|
AppStateManager(Application app)
|
Method Summary | ||
---|---|---|
boolean |
attach(AppState state)
Attach a state to the AppStateManager, the same state cannot be attached twice. |
|
void |
cleanup()
Calls cleanup on attached states, do not call directly. |
|
boolean |
detach(AppState state)
Detaches the state from the AppStateManager. |
|
protected AppState[] |
getInitializing()
|
|
|
getState(java.lang.Class<T> stateClass)
Returns the first state that is an instance of subclass of the specified class. |
|
protected AppState[] |
getStates()
|
|
protected AppState[] |
getTerminating()
|
|
boolean |
hasState(AppState state)
Check if a state is attached or not. |
|
protected void |
initializePending()
|
|
void |
postRender()
Calls render for all attached and initialized states, do not call directly. |
|
void |
render(RenderManager rm)
Calls render for all attached and initialized states, do not call directly. |
|
protected void |
terminatePending()
|
|
void |
update(float tpf)
Calls update for attached states, do not call directly. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AppStateManager(Application app)
Method Detail |
---|
protected AppState[] getInitializing()
protected AppState[] getTerminating()
protected AppState[] getStates()
public boolean attach(AppState state)
state
- The state to attach
public boolean detach(AppState state)
state
- The state to detach
public boolean hasState(AppState state)
state
- The state to check
attach(com.jme3.app.state.AppState)
public <T extends AppState> T getState(java.lang.Class<T> stateClass)
T
- stateClass
-
protected void initializePending()
protected void terminatePending()
public void update(float tpf)
tpf
- Time per frame.public void render(RenderManager rm)
rm
- The RenderManagerpublic void postRender()
public void cleanup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |