Reference Source Test
public class | source

Zone

Keeps track of the Entity direction

Constructor Summary

Public Constructor
public

constructor(game: Game)

Default constructor

Member Summary

Public Members
public

Instance of the game camera

public

direction: Orientation

The direction

public

Instance of the game

public

Instance of the game input

public

Instance of the game renderer

Method Summary

Public Methods
public

getDirection(): Orientation

Return the current direction

public

reset()

Reset the direction

public

Set the direction to down

public

Set the direction to right

public

Set the direction to right

public

setUp()

Set the direction to up

Public Constructors

public constructor(game: Game) source

Default constructor

Params:

NameTypeAttributeDescription
game Game

instance of the game

Public Members

public camera: Camera source

Instance of the game camera

public direction: Orientation source

The direction

public game: Game source

Instance of the game

public input: Input source

Instance of the game input

public renderer: Renderer source

Instance of the game renderer

Public Methods

public getDirection(): Orientation source

Return the current direction

Return:

Orientation

the direction for the zone

public reset() source

Reset the direction

public setDown() source

Set the direction to down

public setLeft() source

Set the direction to right

public setRight() source

Set the direction to right

public setUp() source

Set the direction to up