Reference Source Test
public class | source

EntityHandler

This is a entity handler, responsible for all the Entity callbacks without having to clutter up the entire file.

Constructor Summary

Public Constructor
public

constructor(entity: Entity)

Default constructor

Member Summary

Public Members
public

An array of nearby entities

public

Instance of the entity

public

Instance of the game

Method Summary

Public Methods
public

Check if this is a character

public

Load the entity

public

setEntities(entities: Entities[])

Set the entities list

public

setGame(game: Game)

Set the game instance

Public Constructors

public constructor(entity: Entity) source

Default constructor

Params:

NameTypeAttributeDescription
entity Entity

that will be handled

Public Members

public entities: Entities[] source

An array of nearby entities

public entity: Entity source

Instance of the entity

public game: Game source

Instance of the game

Public Methods

public isCharacter(): Boolean source

Check if this is a character

Return:

Boolean

public load(): Boolean source

Load the entity

Return:

Boolean

false if no entity or game

public setEntities(entities: Entities[]) source

Set the entities list

Params:

NameTypeAttributeDescription
entities Entities[]

array of Entity objects

public setGame(game: Game) source

Set the game instance

Params:

NameTypeAttributeDescription
game Game

instance of the game