@ -40,7 +40,7 @@ import com.jme3.renderer.RenderManager;
* @author Kirill Vainer
* @author Kirill Vainer
* @see com . jme3 . app . state . BaseAppState
* @see com . jme3 . app . state . BaseAppState
* /
* /
public class AbstractAppState implements AppState {
public abstract class AbstractAppState implements AppState {
/ * *
/ * *
* < code > initialized < / code > is set to true when the method
* < code > initialized < / code > is set to true when the method
@ -50,38 +50,70 @@ public class AbstractAppState implements AppState {
* /
* /
protected boolean initialized = false ;
protected boolean initialized = false ;
private boolean enabled = true ;
private boolean enabled = true ;
private String id ;
protected AbstractAppState ( ) {
}
protected AbstractAppState ( String id ) {
this . id = id ;
}
@Override
public void initialize ( AppStateManager stateManager , Application app ) {
public void initialize ( AppStateManager stateManager , Application app ) {
initialized = true ;
initialized = true ;
}
}
@Override
public boolean isInitialized ( ) {
public boolean isInitialized ( ) {
return initialized ;
return initialized ;
}
}
/ * *
* Sets the unique ID of this app state . Note : that setting
* this while an app state is attached to the state manager will
* have no effect on ID - based lookups .
* /
protected void setId ( String id ) {
this . id = id ;
}
@Override
public String getId ( ) {
return id ;
}
@Override
public void setEnabled ( boolean enabled ) {
public void setEnabled ( boolean enabled ) {
this . enabled = enabled ;
this . enabled = enabled ;
}
}
@Override
public boolean isEnabled ( ) {
public boolean isEnabled ( ) {
return enabled ;
return enabled ;
}
}
@Override
public void stateAttached ( AppStateManager stateManager ) {
public void stateAttached ( AppStateManager stateManager ) {
}
}
@Override
public void stateDetached ( AppStateManager stateManager ) {
public void stateDetached ( AppStateManager stateManager ) {
}
}
@Override
public void update ( float tpf ) {
public void update ( float tpf ) {
}
}
@Override
public void render ( RenderManager rm ) {
public void render ( RenderManager rm ) {
}
}
@Override
public void postRender ( ) {
public void postRender ( ) {
}
}
@Override
public void cleanup ( ) {
public void cleanup ( ) {
initialized = false ;
initialized = false ;
}
}