Constructor
new TerminateOutOfBounds(sprite, bounds, killopt)
Construct the adjuster
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
sprite |
module:hcje/sprites.Sprite | The target sprite. |
||
bounds |
module:hcje/utils~RectData | Game area bounds. |
||
kill |
boolean |
<optional> |
false | If true, the sprite is killed on completion. |
- Source:
Extends
Members
(protected) _sprite :module:hcje/sprites.Sprite
The underlying sprite.
Type:
- Overrides:
- Source:
onCompletion :module:hcje/sprites~onAdjustmentComplete
Type:
- Overrides:
- Source:
Methods
adjust(timeStamp, deltaT)
Perform the adjustment. This method will be called in the animation cycle.
Parameters:
| Name | Type | Description |
|---|---|---|
timeStamp |
DOMHighResTimeStamp | Current time stamp in ms. |
deltaT |
number | Change in time in seconds. |
- Overrides:
- Source:
isComplete() → {boolean}
Get completion state.
- Overrides:
- Source:
Returns:
- Type
- boolean
markComplete(reason)
Set as complete.
Parameters:
| Name | Type | Description |
|---|---|---|
reason |
* | Reason for completion. This is passed to the |
- Overrides:
- Source: