- java.lang.Object
-
- tech.fastj.systems.control.SimpleManager
-
- All Implemented Interfaces:
BehaviorHandler
,LogicManager
,TagHandler
public abstract class SimpleManager extends Object implements LogicManager, BehaviorHandler, TagHandler
The manager which allows for control over a game with a single scene.- Since:
- 1.5.0
-
-
Field Summary
Fields Modifier and Type Field Description DrawableManager
drawableManager
InputManager
inputManager
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleManager()
Initializes the contents of theSimpleManager
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Camera
getCamera()
Gets theCamera
of the manager.void
initBehaviors()
Initializes the logic manager's behaviors (called afterLogicManager.init(Display)
).void
processInputEvents()
Processes all stored input events.void
processKeysDown()
Allows the logic manager to process keys that are currently pressed.void
receivedInputEvent(InputEvent inputEvent)
Stores the specified input event to be processed later (processInputEvents()
).void
render(Display display)
Renders the contents of the manager'sDrawableManager
to theDisplay
.void
reset()
Resets the logic manager entirely.void
updateBehaviors()
Updates the logic manager's behaviors (called afterLogicManager.update(Display)
).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tech.fastj.systems.behaviors.BehaviorHandler
addBehaviorListener, clearBehaviorListeners, destroyBehaviorListeners, getBehaviorListeners, initBehaviorListeners, removeBehaviorListener, updateBehaviorListeners
-
Methods inherited from interface tech.fastj.systems.control.LogicManager
init, update
-
Methods inherited from interface tech.fastj.systems.tags.TagHandler
addTaggableEntity, clearTaggableEntities, getAllWithTag, getTaggableEntities, removeTaggableEntity
-
-
-
-
Field Detail
-
inputManager
public final InputManager inputManager
-
drawableManager
public final DrawableManager drawableManager
-
-
Method Detail
-
initBehaviors
public void initBehaviors()
Description copied from interface:LogicManager
Initializes the logic manager's behaviors (called afterLogicManager.init(Display)
).- Specified by:
initBehaviors
in interfaceLogicManager
-
processInputEvents
public void processInputEvents()
Processes all stored input events.- Specified by:
processInputEvents
in interfaceLogicManager
- See Also:
Keyboard
,Mouse
,InputManager
-
processKeysDown
public void processKeysDown()
Description copied from interface:LogicManager
Allows the logic manager to process keys that are currently pressed.- Specified by:
processKeysDown
in interfaceLogicManager
-
receivedInputEvent
public void receivedInputEvent(InputEvent inputEvent)
Stores the specified input event to be processed later (processInputEvents()
).- Specified by:
receivedInputEvent
in interfaceLogicManager
- Parameters:
inputEvent
- The event taken in.
-
updateBehaviors
public void updateBehaviors()
Description copied from interface:LogicManager
Updates the logic manager's behaviors (called afterLogicManager.update(Display)
).- Specified by:
updateBehaviors
in interfaceLogicManager
-
render
public void render(Display display)
Renders the contents of the manager'sDrawableManager
to theDisplay
.- Specified by:
render
in interfaceLogicManager
- Parameters:
display
- TheDisplay
that the game renders to.
-
getCamera
public Camera getCamera()
Gets theCamera
of the manager.- Returns:
- The manager's camera.
-
reset
public void reset()
Description copied from interface:LogicManager
Resets the logic manager entirely.This method is called when the engine exits. Due to the game engine's mutability, it is preferred that all resources of the game engine are removed gracefully.
FOR IMPLEMENTORS: By the end of this method call, the logic manager should have released all its resources.
- Specified by:
reset
in interfaceLogicManager
-
-