API Docs for: 0.0.2
Show:

Atlantis.Game Class

Defined in: Framework\Game.js:14
Module: Framework
Parent Module: Atlantis

Create a game instance who is the starting point of the Framework.

Constructor

Atlantis.Game

(
  • width
  • height
  • (optional)
  • (optional)
)

Parameters:

  • width Number

    Desired screen width.

  • height Height

    Desired screen height.

  • (optional) DomElement

    domElement Sepecify a DOM element to attach the canvas.

  • (optional) Params

    params

Methods

draw

()

In this method the screen must be cleared and components are drawn. All draw code come here.

initialize

()

Initialize the game logic and components.

loadContent

()

Load content.

pause

()

Set the game in pause mode. The canvas is no more updated and drawn.

resume

()

Resume a paused game.

run

()

Methods called by the main loop on each frame who call update and draw methods.

unloadContent

()

Unload content.

update

()

Update

Properties

scaleFactor

Atlantis.Vector2

Gets the scale factor relative to the backbuffer.