Skip to content

EventManager

Adam White edited this page Aug 27, 2017 · 5 revisions

Description

EventManager is a class that enables the program to manage all TimeEvents associated with tickable entities. TimeEvents are registered with registerEvent and all registered events will be ticked when the game ticks via the tickAll method

Methods

Method Use
registerEvent(Tickable, TimeEvent<? extends Tickable>) Adds an event that is associated with a tickable to the Manager.
unregisterEvent(Tickable, TimeEvent<? extends Tickable>) Removes a singular event that is associated with a tickable from the Manager. Will only remove first Tickable/Event pair that matches.
unregisterAll(Tickable) Removes all events associated with a tickable from the Manager.
tickAll(long deltaTime) Ticks all registered events. Completed events will be automatically unregistered.

Implementation

This class has been implemented to 'just work' and should be changed in the future. The registration of TimeEvents could be moved back to entities in the future (making this class depracated)


Gameplay

Design

Asset Creation

User Testing

Code Guidelines


http://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gifhttp://cultofthepartyparrot.com/parrots/partyparrot.gif

Clone this wiki locally