NGONGO-B ELECTRIC STORIES

object aGame

aGame(container,w,h)
The aGame object is the central game object. One instance is created right after the page is loaded and from there the rest of the game is created. The global variable acGame holds the pointer to this object. You can use this variable everywhere in your script.

Parameters

NameTypeDescription
container String ID of the DIV-element on webpage that will contain the games Canvas element.
h Number canvas height
w Number canvas width


Properties

NameTypeDescriptionDefault
NumberText that is shown as an indication for the object the mouse is pointing at.this.hoverText
containerObject(pointer to) the DIV element that holds the game canvasnull
containerNameNumberName of the DIV element that holds the game Canvascontainer
contextObjectdrawing context object of the canvas elementnull
egoObjectaCharacter object of the (current) player characternull
heightNumberHeight of the game screenh
ifaceObjectaInterface object of the (current) interfacenull
itemsArrayArray of aItem objectsEmpty Array
loaderNumberNumber of images that are being downloaded. When it is 0 again the game can resume0
mouseXNumberMouse X position100
mouseYNumberMouse Y position100
musicONFlag to indicate if music should be playedCookie
sceneObjectaScene object for the current scenenull
sceneFileStringName of the script of the current scene""
scenenameStringName of the current scene""
scriptArrayScript that is currently runningEmpty Array
scriptIsRunningBooleanFlag to indicate if a script is running, set to false to stop a current scriptfalse
scriptLineNumberCurrent line in the running script0
soundONFlag to indicate if sounds should be playedCookie
tickerNumberTimer for animation timing0
volumeMaster volume for the music and sound effects.Cookie
widthNumberWidth of the game screenw


Methods

  • addItem
  • loadGame
  • nextScene
  • restoreObj
  • runScript
  • saveGame
  • serializeObj
  • startGame

    Events