FollowerApi class

API that handles following a target GameComponent.

If target is null, the component will follow its parent.

Constructors

FollowerApi(GameComponent _comp)

Properties

hashCode → int
The hash code for this object.
no setterinherited
offset → Vector2?
The offset applied to the target's position.
no setter
priority → int
Returns the target priority if available, otherwise falls back to the component's own priority.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target → GameComponent?
The target component being followed.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeTarget() → void
Removes the current follow target.
setup({GameComponent? target, Vector2? offset}) → void
Sets up the follower behavior.
toString() → String
A string representation of this object.
inherited
update(double dt) → void
Updates the component position to match the target.

Operators

operator ==(Object other) → bool
The equality operator.
inherited