|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AppState
AppState represents a continously executing code inside the main loop.
An AppState
can track when it is attached to the
AppStateManager
or when it is detached. AppState
s
are initialized in the render thread, upon a call to initialize(com.jme3.app.state.AppStateManager, com.jme3.app.Application)
and are de-initialized upon a call to cleanup()
.
Implementations should return the correct value with a call to
isInitialized()
as specified above.
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 active)
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. |
Method Detail |
---|
void initialize(AppStateManager stateManager, Application app)
stateManager
- The state managerapp
- boolean isInitialized()
initialize()
was called on the state,
false otherwise.void setEnabled(boolean active)
AppState
.
The effect of this call depends on implementation. An
AppState
starts as being enabled by default.
active
- activate the AppState or not.boolean isEnabled()
AppState
is enabled, false otherwise.setEnabled(boolean)
void stateAttached(AppStateManager stateManager)
stateManager
- State manager to which the state was attached to.void stateDetached(AppStateManager stateManager)
stateManager
- The state manager from which the state was detached from.void update(float tpf)
tpf
- Time per frame.void render(RenderManager rm)
rm
- RenderManagervoid postRender()
void cleanup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |