public abstract class CompositeAppState extends SimpleAppState
SimpleAppState
that can contain multiple
child SimpleAppState
s. The lifecycle of a child depends on the
parent CompositeAppState
:
SimpleAppState
s can be attached as children before
or after initialization or cleanup of the CompositeAppState
.CompositeAppState
is started, the attached
SimpleAppState
s are started.CompositeAppState
is stopped, children are stopped.
(The order in which they are stopped is handled by the underlying jME
Application
's AppStateManager
and cannot be
guaranteed.)CompositeAppState
(or its controls) is
enabled/disabled, so are the children (or their controls).Constructor and Description |
---|
CompositeAppState() |
Modifier and Type | Method and Description |
---|---|
void |
disableControls()
In addition to disabling the
CompositeAppState 's controls,
this disables all child SimpleAppState controls. |
void |
enableControls()
In addition to enabling the
CompositeAppState 's controls,
this enables all child SimpleAppState controls. |
void |
initialize(com.jme3.app.state.AppStateManager stateManager,
com.jme3.app.Application app)
In addition to the default behavior, this method initializes any child
SimpleAppState s. |
void |
stop()
Before the
CompositeAppState is stopped, this method stops
the child SimpleAppState s. |
cleanup, createBasicMaterial, createLitMaterial, enqueue, getApplication, getCollision, getCrosshairRay, getCursorRay, getCursorRayFromClick, getMaterial, isEnabled, isInitialized, postRender, printCollisionResults, removeMaterial, render, setEnabled, setMaterial, start, stateAttached, stateDetached, update
public void initialize(com.jme3.app.state.AppStateManager stateManager, com.jme3.app.Application app)
SimpleAppState
s.initialize
in interface com.jme3.app.state.AppState
initialize
in class SimpleAppState
public void stop()
CompositeAppState
is stopped, this method stops
the child SimpleAppState
s.
Note that the underlying jME Application
's
AppStateManager
processes the stop commands, so this class cannot
guarantee that the cleanup methods of the child
SimpleAppState
s will be processed before the
CompositeAppState
.
stop
in class SimpleAppState
public void enableControls()
CompositeAppState
's controls,
this enables all child SimpleAppState
controls.enableControls
in class SimpleAppState
public void disableControls()
CompositeAppState
's controls,
this disables all child SimpleAppState
controls.disableControls
in class SimpleAppState