The Path this PathFollower is following. It can only follow one Path at a time.
Should the PathFollower automatically rotate to point in the direction of the Path?
Set the Path that this PathFollower should follow.
Optionally accepts Phaser.Types.GameObjects.PathFollower.PathConfig settings.
name | type | arguments | description |
---|---|---|---|
path | Phaser.Curves.Path |
The Path this PathFollower is following. It can only follow one Path at a time. |
|
config | number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig | <optional> |
Settings for the PathFollower. |
This Game Object.
Set whether the PathFollower should automatically rotate to point in the direction of the Path.
name | type | arguments | description |
---|---|---|---|
value | boolean |
Whether the PathFollower should automatically rotate to point in the direction of the Path. |
|
offset | number | <optional> |
Rotation offset in degrees. |
This Game Object.
Is this PathFollower actively following a Path or not?
To be considered as isFollowing
it must be currently moving on a Path, and not paused.
true
is this PathFollower is actively following a Path, otherwise false
.
Starts this PathFollower following its given Path.
name | type | arguments | Default | description |
---|---|---|---|---|
config | number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig | <optional> | {} |
The duration of the follow, or a PathFollower config object. |
startAt | number | <optional> | 0 |
Optional start position of the follow, between 0 and 1. |
This Game Object.
Pauses this PathFollower. It will still continue to render, but it will remain motionless at the point on the Path at which you paused it.
This Game Object.
Resumes a previously paused PathFollower.
If the PathFollower was not paused this has no effect.
This Game Object.
Stops this PathFollower from following the path any longer.
This will invoke any 'stop' conditions that may exist on the Path, or for the follower.
This Game Object.
Internal update handler that advances this PathFollower along the path.
Called automatically by the Scene step, should not typically be called directly.