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.
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
Name | Type | Description | |
---|---|---|---|
container | String | ID of the DIV-element on webpage that will contain the games Canvas element. | |
h | Number | canvas height | |
w | Number | canvas width |
Name | Type | Description | Default |
---|---|---|---|
Number | Text that is shown as an indication for the object the mouse is pointing at. | this.hoverText | |
container | Object | (pointer to) the DIV element that holds the game canvas | null |
containerName | Number | Name of the DIV element that holds the game Canvas | container |
context | Object | drawing context object of the canvas element | null |
ego | Object | aCharacter object of the (current) player character | null |
height | Number | Height of the game screen | h |
iface | Object | aInterface object of the (current) interface | null |
items | Array | Array of aItem objects | Empty Array |
loader | Number | Number of images that are being downloaded. When it is 0 again the game can resume | 0 |
mouseX | Number | Mouse X position | 100 |
mouseY | Number | Mouse Y position | 100 |
musicON | Flag to indicate if music should be played | Cookie | |
scene | Object | aScene object for the current scene | null |
sceneFile | String | Name of the script of the current scene | "" |
scenename | String | Name of the current scene | "" |
script | Array | Script that is currently running | Empty Array |
scriptIsRunning | Boolean | Flag to indicate if a script is running, set to false to stop a current script | false |
scriptLine | Number | Current line in the running script | 0 |
soundON | Flag to indicate if sounds should be played | Cookie | |
ticker | Number | Timer for animation timing | 0 |
volume | Master volume for the music and sound effects. | Cookie | |
width | Number | Width of the game screen | w |