import Overlay from 'WTF-Adventure/WTF-Adventure/client/controllers/overlay.js'
Overlay
Shows an popup overlay when the mouse is over a character or enemy that displays information about them
Constructor Summary
Public Constructor | ||
public |
constructor(input: Input) Default constructor |
Member Summary
Public Members | ||
public |
attackInfo: DOMElement Jquery reference to the attack info box |
|
public |
details: DOMElement Jquery reference to the details of the attack info box |
|
public |
health: DOMElement Jquery reference to the name of the health bar of the attack info box |
|
public |
A reference to the entity they are hovering over |
|
public |
image: DOMElement Jquery reference to the image section of the attack info box |
|
public |
Input class |
|
public |
name: DOMElement Jquery reference to the name of the attack info box |
|
public |
A callback for when the overlay is done updating |
Method Summary
Public Methods | ||
public |
clean() Cleans out the details and the entity they're hovering on |
|
public |
display() Fades in the attack info |
|
public |
Returns an instance of the game object |
|
public |
Check if the entity has a health bar |
|
public |
hide() Fades out and hides the attack info |
|
public |
Check to see if the atttack info is currently visible |
|
public |
Sets an update callback |
|
public |
Update the overlay |
|
public |
validEntity(entity: Entity): Boolean Checks whether or not this is an entity they can interact with |
Public Constructors
Public Members
public health: DOMElement source
Jquery reference to the name of the health bar of the attack info box
Public Methods
public onUpdate(callback: Function) source
Sets an update callback
Params:
Name | Type | Attribute | Description |
callback | Function | called when the overlay is updated |