new BHell_Emitter_Base()
Emitter base class. Spawns a bullet at a given frequency.
- Source:
Extends
Methods
initialize(x, y, params, parent, bulletList)
Constructor. Emitter parameters:
- x: X offset for the emitter's movement,
- y: Y offset for the emitter's movement,
- period: shooting period,
- charset: Character set for the emitter (null if the emitter should be invisible),
- index: Character index for the emitter (ignored if charset is null, or a big character),
- direction: Character direction for the emitter (Uses RPGMaker's 2-4-6-8 convention),
- frame: Initial character frame for the emitter (0-2),
- animated: True if the Sprite should dynamically change over time,
- animation_speed: Frames after which the character frame is updated,
- bullet: bullet parameters (see
BHell.BHell_Bullet
for its content).
Parameters:
Name | Type | Description |
---|---|---|
x |
X coordinate of the emitter. |
|
y |
Y coordinate of the emitter. |
|
params |
Parameters for the emitter and the spawned bullets. |
|
parent |
Container for the emitter's and bullets' sprites. |
|
bulletList |
Array in which the bullets will be pushed. |
- Overrides:
- Source:
move(x, y)
Moves the emitter, relative to the initialised offset.
Parameters:
Name | Type | Description |
---|---|---|
x |
New x coordinate. |
|
y |
New y coordinate. |
- Source:
shoot()
Spawns a single bullet moving upwards. Bullet's speed and appearance are determined by this.bulletParams.
- Source:
update()
Updates the emitter's sprite and state. Called every frame. Shoots if in shooting state.
- Overrides:
- Source:
updateCharacterFrame()
Updates the charset frame, calculating the correct offsets.
- Inherited From:
- Source: