GameEvents
Constructors
new
GameEvents
()
Creates a new instance of the GameEvents object
Methods
get
() ⇨ Generator<GameEvent>
Returns the event that occurred one at a time
Example:
gameloop(() => {
for (const ev of game.events.get()) {
console.log(ev.type)
}
})