public class ScreenManagerSystem extends Object implements System<GameScreenEntity>, ScreenManager<GameScreenEntity>
ScreenManager as a System suitable for
 the Entity-Component-System architecture| Modifier and Type | Field and Description | 
|---|---|
protected GameScreenEntity | 
currentScreen  | 
protected GameScreenEntity | 
nextScreen  | 
protected Transition | 
transitionIn  | 
protected Transition | 
transitionOut  | 
| Constructor and Description | 
|---|
ScreenManagerSystem()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addEntity(GameScreenEntity entity)
 | 
void | 
addGameScreen(GameScreenEntity screen)
Interface implementation. 
 | 
void | 
enterGameScreen(int id,
               Transition transitionOut,
               Transition transitionIn)
Begins a transition to a new  
GameScreen | 
GameScreenEntity | 
getGameScreen(int id)
Returns the  
GameScreen with the given id | 
void | 
initialise(GameContainer gc)
Initialise the  
System | 
void | 
interpolate(GameContainer gc,
           float alpha)
Interpolate the  
System | 
boolean | 
isDebugging()
Returns if this  
System is debugging | 
boolean | 
isTransitioning()
Returns if the  
ScreenManager is moving between Screens | 
void | 
removeEntity(GameScreenEntity entity)
 | 
void | 
render(GameContainer gc,
      Graphics g)
Render the  
System | 
void | 
setDebugging(boolean debugging)
Sets whether or not this  
System is in debug mode | 
void | 
update(GameContainer gc,
      float delta)
Update the  
System | 
protected GameScreenEntity currentScreen
protected GameScreenEntity nextScreen
protected Transition transitionIn
protected Transition transitionOut
public void addEntity(GameScreenEntity entity)
SystemaddEntity in interface System<GameScreenEntity>entity - The Entity to be addedpublic void removeEntity(GameScreenEntity entity)
SystemremoveEntity in interface System<GameScreenEntity>entity - The UUIDEntity to be removedpublic void initialise(GameContainer gc)
SystemSysteminitialise in interface System<GameScreenEntity>gc - The GameContainer calling initialisepublic void update(GameContainer gc, float delta)
SystemSystemupdate in interface ScreenManager<GameScreenEntity>update in interface System<GameScreenEntity>gc - The GameContainer calling updatedelta - The time in seconds since the last updatepublic void interpolate(GameContainer gc, float alpha)
SystemSysteminterpolate in interface ScreenManager<GameScreenEntity>interpolate in interface System<GameScreenEntity>gc - The GameContainer calling interpolatealpha - The alpha value to use during interpolationpublic void render(GameContainer gc, Graphics g)
SystemSystemrender in interface ScreenManager<GameScreenEntity>render in interface System<GameScreenEntity>gc - The GameContainer calling renderg - The Graphics instancepublic boolean isDebugging()
SystemSystem is debuggingisDebugging in interface System<GameScreenEntity>public void setDebugging(boolean debugging)
SystemSystem is in debug modesetDebugging in interface System<GameScreenEntity>debugging - True if debuggingpublic void enterGameScreen(int id,
                   Transition transitionOut,
                   Transition transitionIn)
ScreenManagerGameScreenenterGameScreen in interface ScreenManager<GameScreenEntity>id - The id of the GameScreen to transition totransitionOut - The outgoing Transition, e.g. fade outtransitionIn - The incoming Transition, e.g. fade inpublic void addGameScreen(GameScreenEntity screen)
addGameScreen in interface ScreenManager<GameScreenEntity>screen - The GameScreen to be addedpublic GameScreenEntity getGameScreen(int id)
ScreenManagerGameScreen with the given idgetGameScreen in interface ScreenManager<GameScreenEntity>id - The id to search forGameScreen registered with this
         managerpublic boolean isTransitioning()
ScreenManagerScreenManager is moving between ScreensisTransitioning in interface ScreenManager<GameScreenEntity>Transitions activeCopyright © 2014. All rights reserved.