API Docs for: 0.0.2
Show:

Atlantis.Engine Class

Extends Atlantis.Game
Module: Engine
Parent Module: Atlantis

The engine class that initialize an Atlantis.Game object and setup managers and scene.

Constructor

Atlantis.Engine

(
  • width
  • height
  • domElement
)

Parameters:

  • width Number

    Desired screen width.

  • height Number

    Desired screen height

  • domElement Number

    The DOM element to use for canvas (optional).

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.