new BHell_Controller()
Controller class. Handles the game mechanics.
Note: Generators in a map with negative scroll speed are still placed bottom-to-top, only the in-game scrolling is affected (ie. the map will scroll top-to-bottom).
- Source:
Methods
destroyEnemyBullets()
Destroys every enemy bullet on screen.
- Source:
initialize(stage, playerId, lives, parent)
Constructor. Creates player and generators.
Parameters:
Name | Type | Description |
---|---|---|
stage |
Map id for the stage. |
|
playerId |
Id of the player which will be created. |
|
lives |
Initial lives for the player (-1: infinite). |
|
parent |
Container for the sprites. |
- Source:
pushMessage(face, index, background, position, lines)
Pushes a new message on the message list.
Parameters:
Name | Type | Description |
---|---|---|
face |
Faceset. |
|
index |
Index of the face to display. |
|
background |
Background window format (0: window, 1: shadow, 2: transparent). |
|
position |
Window position (0: bottom, 1: middle, 2: top). |
|
lines |
Array of lines to display with the given settings. |
- Source:
update()
Updates the game's loop until all generators are cleared or until the player looses all its lives.
- Source: