|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.app.state.AbstractAppState
com.jme3.app.StatsAppState
public class StatsAppState
Displays stats in SimpleApplication's GUI node or using the node and font parameters provided.
Field Summary | |
---|---|
protected BitmapText |
fpsText
|
protected int |
frameCounter
|
protected BitmapFont |
guiFont
|
protected Node |
guiNode
|
protected float |
secondCounter
|
protected boolean |
showSettings
|
protected StatsView |
statsView
|
Fields inherited from class com.jme3.app.state.AbstractAppState |
---|
initialized |
Constructor Summary | |
---|---|
StatsAppState()
|
|
StatsAppState(Node guiNode,
BitmapFont guiFont)
|
Method Summary | |
---|---|
void |
cleanup()
Cleanup the game state. |
BitmapText |
getFpsText()
|
float |
getSecondCounter()
|
StatsView |
getStatsView()
|
void |
initialize(AppStateManager stateManager,
Application app)
Called to initialize the AppState. |
void |
loadFpsText()
Attaches FPS statistics to guiNode and displays it on the screen. |
void |
loadStatsView()
Attaches Statistics View to guiNode and displays it on the screen above FPS statistics line. |
void |
setDisplayFps(boolean show)
|
void |
setDisplayStatView(boolean show)
|
void |
setEnabled(boolean enabled)
Enable or disable the functionality of the AppState . |
void |
toggleStats()
|
void |
update(float tpf)
Called to update the state. |
Methods inherited from class com.jme3.app.state.AbstractAppState |
---|
isEnabled, isInitialized, postRender, render, stateAttached, stateDetached |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected StatsView statsView
protected boolean showSettings
protected Node guiNode
protected float secondCounter
protected int frameCounter
protected BitmapText fpsText
protected BitmapFont guiFont
Constructor Detail |
---|
public StatsAppState()
public StatsAppState(Node guiNode, BitmapFont guiFont)
Method Detail |
---|
public BitmapText getFpsText()
public StatsView getStatsView()
public float getSecondCounter()
public void toggleStats()
public void setDisplayFps(boolean show)
public void setDisplayStatView(boolean show)
public void initialize(AppStateManager stateManager, Application app)
AppState
initialize
in interface AppState
initialize
in class AbstractAppState
stateManager
- The state managerpublic void loadFpsText()
public void loadStatsView()
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
setEnabled
in class AbstractAppState
enabled
- activate the AppState or not.public void update(float tpf)
AppState
update
in interface AppState
update
in class AbstractAppState
tpf
- Time per frame.public void cleanup()
AppState
cleanup
in interface AppState
cleanup
in class AbstractAppState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |