|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.app.state.AbstractAppState
public class AbstractAppState
AbstractAppState
implements some common methods
that make creation of AppStates easier.
Field Summary | |
---|---|
protected boolean |
initialized
initialized is set to true when the method
initialize(com.jme3.app.state.AppStateManager, com.jme3.app.Application)
is called. |
Constructor Summary | |
---|---|
AbstractAppState()
|
Method Summary | |
---|---|
void |
cleanup()
Cleanup the game state. |
void |
initialize(AppStateManager stateManager,
Application app)
Called to initialize the AppState. |
boolean |
isEnabled()
|
boolean |
isInitialized()
|
void |
postRender()
Called after all rendering commands are flushed. |
void |
render(RenderManager rm)
Render the state. |
void |
setEnabled(boolean enabled)
Enable or disable the functionality of the AppState . |
void |
stateAttached(AppStateManager stateManager)
Called when the state was attached. |
void |
stateDetached(AppStateManager stateManager)
Called when the state was detached. |
void |
update(float tpf)
Called to update the state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean initialized
initialized
is set to true when the method
initialize(com.jme3.app.state.AppStateManager, com.jme3.app.Application)
is called. When cleanup()
is called, initialized
is set back to false.
Constructor Detail |
---|
public AbstractAppState()
Method Detail |
---|
public void initialize(AppStateManager stateManager, Application app)
AppState
initialize
in interface AppState
stateManager
- The state managerpublic boolean isInitialized()
isInitialized
in interface AppState
initialize()
was called on the state,
false otherwise.public void setEnabled(boolean enabled)
AppState
AppState
.
The effect of this call depends on implementation. An
AppState
starts as being enabled by default.
setEnabled
in interface AppState
enabled
- activate the AppState or not.public boolean isEnabled()
isEnabled
in interface AppState
AppState
is enabled, false otherwise.AppState.setEnabled(boolean)
public void stateAttached(AppStateManager stateManager)
AppState
stateAttached
in interface AppState
stateManager
- State manager to which the state was attached to.public void stateDetached(AppStateManager stateManager)
AppState
stateDetached
in interface AppState
stateManager
- The state manager from which the state was detached from.public void update(float tpf)
AppState
update
in interface AppState
tpf
- Time per frame.public void render(RenderManager rm)
AppState
render
in interface AppState
rm
- RenderManagerpublic void postRender()
AppState
postRender
in interface AppState
public void cleanup()
AppState
cleanup
in interface AppState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |