Class Fz2D.Game
| Defined in: | src/sys/game.coffee |
Overview
Public: Game
Class Method Summary
- Fz2D.Game .run(opts = {}) Instantiates and executes the Game.
Instance Method Summary
- ::constructor(opts = {}) Constructor.
- ::draw(ctx) Draws scene on every frame.
- ::load(path) Loads one or more asset via the loader.
- ::onload(game) Onload(ed) callback.
- ::registerPlugin(plugin) Registers a plugin dynamically.
- ::update(timer, input) Updates scene on every frame.
Class Method Details
Constructor Details
::constructor(opts = {}) Source
Public: Constructor.
opts - Hash of options (default: {})
Instance Method Details
::draw(ctx) Source
Public: Draws scene on every frame.
ctx - Fz2D.Canvas
::load(path) Source
Public: Loads one or more asset via the loader.
path - one or more partial relative paths
Returns an instance of the asset.
::registerPlugin(plugin) Source
Public: Registers a plugin dynamically.
plugin - Fz2D.Plugin
::update(timer, input) Source
Public: Updates scene on every frame.
timer - Fz2D.Timer
input - Fz2D.Input