Class

Wall

Wall(spawn, textured)

Wall entity
Constructor

# new Wall(spawn, textured)

Create a new wall entity.
Parameters:
Name Type Description
spawn Object the wall spawn coordinates
x number the wall spawn x-coordinate
y number the wall spawn y-coordinate
textured boolean whether or not to use texture

View Source browser/lib/Entity/Wall.js, line 8

Classes

Wall

Members

string

# bounding

bounding - the entity's bounding behavior.

View Source browser/lib/Entity/Wall.js, line 30

Object

# bounds

bounds - the entity's bounds for intersection.

View Source browser/lib/Entity/Wall.js, line 73

Image | null

# image

image - the image to use if textures are enabled.

View Source browser/lib/Entity/Wall.js, line 60

boolean

# sleep

sleep - the entity's render state.

View Source browser/lib/Entity/Wall.js, line 48

boolean

# textured

textured - whether or not to use textures for the wall.

View Source browser/lib/Entity/Wall.js, line 54

string

# type

type - the type of entity.

View Source browser/lib/Entity/Wall.js, line 24

number

# x

x - the entity's x coordinate.

View Source browser/lib/Entity/Wall.js, line 36

number

# y

y - the entity's y coordinate.

View Source browser/lib/Entity/Wall.js, line 42

Methods

# render(context) → {void}

Render the wall entity on the canvas. This is called every frame/repaint to render the entity. Note that this is a statically-placed entity, therefore the x,y coordinates will not change on update.
Parameters:
Name Type Description
context CanvasRenderingContext2D the canvas rendering context

View Source browser/lib/Entity/Wall.js, line 92

void