Game Engine
Physics
Entity
Entity(Game: Main.Game, x: number?, y: number?, health: number?)
━━ Properties ━━
Entity.id: number
READ-ONLY
static
position: Util.Vector2i
description: The position of the entity. Also stores the velocity of the entity.
visible: boolean
description: Whether or not the entity renders to the screen when within the bounds of the screen
health: number
description: Once the entity's health reaches or goes below 0, all event listeners added through Entity#onDeath are invoked.
Min: 0
Max: inf
rotation: number
description: The rotation to be applied when rendering the entity
solid: boolean
description: Whether this entity collides with other entities
speed: number
description: How fast the entity moves
id: number
READ-ONLY
description: An identification number used internally within the engine
pixels: Array{Array{Util.Color}} (2D Array of Util.Color instances)
READ-ONLY
width: number
READ-ONLY
height: number
READ-ONLY
game: Main.Game
READ-ONLY
━━ Instance Methods ━━
setPixels(width: number, height: number, pixArr: Array{Util.Color}) -> void
setSprite(width: number, height: number, path: string) -> void
destroy() -> void
onDeath(c: function) -> void
removeListener(c: function) -> void
checkCollision(e: Entity) -> boolean
applyVelocity(xa: number, ya: number, timelimit: number?) -> void
moveTo(x: number, y: number) -> void
update() -> void
render() -> void
### Light
LightSource(map: Main.GameMap, x: number?, y: number?, game: Main.Game)
━━ Properties ━━
map: Main.GameMap
READ-ONLY
emit: boolean
description: Should the light emit light?
radius: number
description: The radius of the radial light.
Min: 0
Min: 360
direction: number
description: The direction the light should point. Has no effect at 360 degree radius.
Min: 0
Min: 360
distance: number
description: The distance or length, in (px), that the light will have an effect.
Min: 0
Max: inf
ignoreSolids: boolean
description: Can the light pass through solid entities?
intensity: number
description: How bright does the light start?
Min: 0
Max: 100
color: Util.Color
description: The position of the entity. Also stores the velocity of the entity.
position: Util.Vector2i
description: The position of the entity. Also stores the velocity of the entity.
game: Main.Game
READ-ONLY
description: The position of the entity. Also stores the velocity of the entity.
━━ Instance Methods ━━
getLightmap() -> Dictionary {lightmap: Main.GameMap, points: Array
>, solids: boolean}
getSolidObstacles -> Dictionary {boundary: Array, entity: Dictionary {min: number, max: number}}
description: boundary is an Array of Util.Point which represents points in the map which are solid due to the map boundary.
description: entity is a Dictionary containing the minimum position and maximum position of the entity. The bounding box for the entity.
Only solid entities
Lighting(Game: Main.Game, map: Main.GameMap)
━━ Properties ━━
lights: Array{Light.LightSource}
READ-ONLY
map: Main.GameMap
READ-ONLY
game: Main.Game
READ-ONLY
currentLightMap: Array{Array{number}} (2D Array of numbers)
READ-ONLY
━━ Instance Methods ━━
addLight(x: number, y: number, hexColor: Util.HexColor, alpha: number?) -> void
description:
generateMap(x: number, y: number) -> Array{Array{number}}
description:
getLight(x:number,y:number) -> Light.LightSource | void
description:
getLightsInRadiusOfPos(x: number, y: number, radius: number) -> Array{Light.LightSource}
description:
render() -> void
description:
### Main
### Particle
### Util
## User
### Controls