Info
Displays additional information on the screen as the game is running. For instance, missing hits on another player, regenerating health, and damage done with a Splat
Constructor Summary
Public Constructor | ||
public |
constructor(game: Game) Default constructor |
Member Summary
Public Members | ||
public |
A queue to destroy the entities over time |
|
public |
An instance of the game |
|
public |
A collection of all the info entities |
Method Summary
Public Methods | ||
public |
Add an info object to the destroyQueue |
|
public |
Create the informational entity |
|
public |
forEachInfo(callback: Function) Loop through each info and pass them to a callback |
|
public |
generateId(info: Modules, x: Number, y: Number): Number Generate an ID for an info based on the game type, info Module.Hits and x,y coordinates |
|
public |
Returns the count of the number of info objects currently active |
|
public |
The hit has made contact with another entity |
|
public |
Level up |
|
public |
regenerate(type: Modules, data: Object, x: Number, y: Number) Renerage health |
|
public |
Update each info object over time and destroy any in the destroyQueue |
Public Constructors
Public Members
Public Methods
public addInfo(info: Object) source
Add an info object to the destroyQueue
Params:
Name | Type | Attribute | Description |
info | Object | An info object |
public create(type: Modules, data: Object, x: Number, y: Number) source
Create the informational entity
public forEachInfo(callback: Function) source
Loop through each info and pass them to a callback
Params:
Name | Type | Attribute | Description |
callback | Function | Callback function |
public generateId(info: Modules, x: Number, y: Number): Number source
Generate an ID for an info based on the game type, info Module.Hits and x,y coordinates
public hit(type: Modules, data: Object, x: Number, y: Number) source
The hit has made contact with another entity