Class: BHell_Emitter_Rotate

BHell.BHell_Emitter_Rotate()

new BHell_Emitter_Rotate()

Rotating emitter. It spawns a single bullet moving upwards, while moving in a circular pattern.

Source:

Extends

Methods

initialize(x, y, params, parent, bulletList)

Constructor. Additional parameters:

  • dt: rotation speed (in radians per frame),
  • theta: initial angle (in radians),
  • radius: rotation radius around the pivot.
Parameters:
Name Type Description
x

X coordinate of the rotation pivot.

y

Y coordinate of the rotation pivot.

params

Emitter's and bullets' parameters.

parent

Container for the sprites.

bulletList

Array in which the bullets will be pushed.

Overrides:
Source:

move(x, y)

Rotates the emitter around the pivot.

Parameters:
Name Type Description
x

Pivot's new x coordinate.

y

Pivot's new y coordinate.

Overrides:
Source:

shoot()

Spawns a single bullet moving upwards. Bullet's speed and appearance are determined by this.bulletParams.

Inherited From:
Source:

update()

Updates the emitter's sprite and state. Called every frame. Shoots if in shooting state.

Inherited From:
Source:

updateCharacterFrame()

Updates the charset frame, calculating the correct offsets.

Inherited From:
Source: