Added a getState() method that will optionally fail on state misses.

accellbaker
Ali-RS 6 years ago committed by GitHub
parent d36deaf8ea
commit c0823bb903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java

@ -142,7 +142,11 @@ public abstract class BaseAppState implements AppState {
} }
public final <T extends AppState> T getState( Class<T> type ) { public final <T extends AppState> T getState( Class<T> type ) {
return getStateManager().getState(type); return getState( type, false );
}
public final <T extends AppState> T getState( Class<T> type, boolean failOnMiss ) {
return getStateManager().getState( type, failOnMiss );
} }
@Override @Override

Loading…
Cancel
Save