Class Fz2D.Game

Defined in: src/sys/game.coffee

Overview

Public: Game

Class Method Summary

Instance Method Summary

Class Method Details

Fz2D.Game .run(opts = {}) Source

Public: Instantiates and executes the Game. opts - Hash of options (default: {}) Returns a Fz2D.Game.

Parameters:

  • optsHash of options (default: {})

Returns:

Constructor Details

::constructor(opts = {}) Source

Public: Constructor. opts - Hash of options (default: {})

Parameters:

  • optsHash of options (default: {})

Instance Method Details

::draw(ctx) Source

Public: Draws scene on every frame. ctx - Fz2D.Canvas

Parameters:

::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.

Parameters:

  • pathone or more partial relative paths

Returns:

  • Returns an instance of the asset.

::onload(game) Source

Public: Onload(ed) callback. game - Fz2D.Game

Parameters:

::registerPlugin(plugin) Source

Public: Registers a plugin dynamically. plugin - Fz2D.Plugin

Parameters:

::update(timer, input) Source

Public: Updates scene on every frame. timer - Fz2D.Timer input - Fz2D.Input

Parameters: