Classes
Members
Methods
# cleanupProjectiles(walls) → {void}
Clean up handled projectiles to stop rendering and updates.
Parameters:
Name | Type | Description |
---|---|---|
walls |
Array.<Wall>
|
the rendered walls |
void
# handleFire(context, player) → {void}
Handle weapon fire.
Parameters:
Name | Type | Description |
---|---|---|
context |
CanvasRenderingContext2D
|
the canvas rendering context |
player |
Player
|
the player entity |
void
# registerProjectiles(context, player) → {void}
Register bullet projectiles for rendering and collision.
Parameters:
Name | Type | Description |
---|---|---|
context |
CanvasRenderingContext2D
|
the canvas rendering context |
player |
Player
|
the player entity |
void
# render() → {void}
Render ballistics projectiles.
This is called every frame/repaint to render projectiles. Note that
projectiles are an animated entities, therefore their x,y coordinates
will change on update.
void
# setEquippedWeaponDisplayInformation() → {void}
Set equippred weapon display information e.g. ammo, magazines.
void
# shouldReloadWeaponAmmoClip() → {boolean}
Determine if weapon needs to be reloaded and handle accordingly.
boolean
# update(game) → {void}
Update game ballistics data, handle weapon triggering and projectile cleanup.
Checks the weapon state, sets the weapon stats, handles tiggered weapon actions
and audio. This is called every frame/repaint.
Parameters:
Name | Type | Description |
---|---|---|
game |
Game
|
the managed game instance |
void