new BHell_Bomb_Earth()
Earth bomb class. Creates two protective rings around the player. Instead of travelling straight, the bullets orbit the player. Lasts 10 seconds.
Extends
Methods
activate(x, y)
Activates the bomb. Creates 50 bullets rotating (the default behaviour is overridden) counterclockwise at 200 pixels from the player and 25 rotating clockwise at 100 pixels from the player. Bullets are stored in an internal array for deactivation's sake.
Parameters:
Name | Type | Description |
---|---|---|
x |
X activation coordinate. |
|
y |
Y activation coordinate. |
- Overrides:
- Source:
deactivate()
Deactivates the bomb. Destroyes every bullet left orbiting the player.
- Overrides:
- Source:
initialize(parent, params, bulletList)
Constructor.
Parameters:
- sprite: The bullets' charset file,
- index: The bullets' charset index,
- direction: The bullets' charset direction,
- frame: The bullets' charset frame,
- icon: The bomb's iconset,
- icon_index: The bomb's icon index,
- se: The sound effect to be played when launching a bomb.
Parameters:
Name | Type | Description |
---|---|---|
parent |
Container for the derived classes' effects. |
|
params |
Bomb parameters. |
|
bulletList |
Array in which the spawned bullets will be stored. |
- Overrides:
- Source:
isActive() → {boolean}
Checks if a bomb is currently active.
- Inherited From:
- Source:
Returns:
True if a bomb is active.
- Type
- boolean
update()
Updates the bomb. After 10 seconds it's deactivated.
- Overrides:
- Source:
updateCharacterFrame()
Updates the charset frame, calculating the correct offsets.
- Inherited From:
- Source: