public abstract class CartoucheState
extends com.jme3.app.state.BaseAppState
implements jme3utilities.Loadable
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger
message logger for this class
|
| Modifier | Constructor and Description |
|---|---|
protected |
CartoucheState(java.lang.String name,
float xFraction,
float yFraction)
Instantiate an enabled CartoucheState.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup(com.jme3.app.Application application)
Callback invoked after this AppState is detached or during application
shutdown if the state is still attached.
|
protected void |
displayText(java.lang.String text)
Compare the specified text to the displayed text and repopulate the Node
if they differ.
|
protected com.jme3.scene.Node |
getNode()
Access the Node that gets attached to the GUI node.
|
protected void |
initialize(com.jme3.app.Application application)
Callback invoked after this AppState is attached but before onEnable().
|
void |
load(com.jme3.asset.AssetManager assetManager)
Load the assets of this instance without attaching them to any scene.
|
protected void |
onDisable()
Callback invoked whenever this AppState ceases to be both attached and
enabled.
|
protected void |
onEnable()
Callback invoked whenever this AppState becomes both attached and
enabled.
|
protected void |
repopulateNode(java.lang.String text)
Repopulate the Node from scratch.
|
void |
update(float tpf)
Callback to update this AppState, invoked once per frame when the
AppState is both attached and enabled.
|
protected abstract void |
updateNode()
Update the displayed text.
|
public static final java.util.logging.Logger logger
protected CartoucheState(java.lang.String name,
float xFraction,
float yFraction)
name - a name for the new AppStatexFraction - the center X as a fraction of the viewport widthyFraction - the center Y as a fraction of the viewport widthprotected void displayText(java.lang.String text)
text - the text to display (may be null)protected com.jme3.scene.Node getNode()
protected void repopulateNode(java.lang.String text)
text - the text to display (may be null)protected abstract void updateNode()
protected void cleanup(com.jme3.app.Application application)
cleanup in class com.jme3.app.state.BaseAppStateapplication - the application instance (not null)protected void initialize(com.jme3.app.Application application)
initialize in class com.jme3.app.state.BaseAppStateapplication - the application instance (not null)protected void onDisable()
onDisable in class com.jme3.app.state.BaseAppStateprotected void onEnable()
onEnable in class com.jme3.app.state.BaseAppStatepublic void update(float tpf)
update in interface com.jme3.app.state.AppStateupdate in class com.jme3.app.state.BaseAppStatetpf - the time interval between frames (in seconds, ≥0)public void load(com.jme3.asset.AssetManager assetManager)
load in interface jme3utilities.LoadableassetManager - for loading assets (not null)