new BHell_Mover_Orbit()
Orbit movement class. Moves towards the player up to a given distance, then starts orbiting around it.
Extends
Methods
initialize(radius, counterclockwise)
Constructor.
Parameters:
Name | Type | Description |
---|---|---|
radius |
Orbit distance from the player. |
|
counterclockwise |
If true orbits in the counterclockwise direction. |
- Overrides:
- Source:
move(oldX, oldY, speed) → {Array}
If the player is not ready yet (e.g. it's just been resurrected) remains still, otherwise chases the player until the set radius is reached, then starts orbiting.
Parameters:
Name | Type | Description |
---|---|---|
oldX |
Old x coordinate. |
|
oldY |
Old y coordinate. |
|
speed |
Movement speed (pixels per frame during the chase phase, degrees per frame during the orbiting phase). |
- Overrides:
- Source:
Returns:
- Type
- Array