SteeringManager class
This class is responsible for managing the steering of a single vehicle. The steering manager can manage multiple steering behaviors and combine their produced force into a single one used by the vehicle.
@author {@link https://github.com/Mugen87|Mugen87}
Constructors
- SteeringManager(Vehicle vehicle)
- Constructs a steering manager.
Properties
Methods
-
add(
SteeringBehavior behavior) → SteeringManager - Adds the given steering behavior to this steering manager.
-
calculate(
double delta, Vector3 result) → Vector3 - Calculates the steering forces for all active steering behaviors and combines it into a single result force. This method is called in
-
clear(
) → SteeringManager - Clears the internal state of this steering manager.
-
fromJSON(
Map< String, dynamic> json) → SteeringManager - Restores this instance from the given JSON object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerType(
String type, Function constructor) → SteeringManager - Registers a custom type for deserialization. When calling {@link SteeringManager#fromJSON} the steering manager is able to pick the correct constructor in order to create custom steering behavior.
-
remove(
SteeringBehavior behavior) → SteeringManager - Removes the given steering behavior from this steering manager.
-
resolveReferences(
Map< String, GameEntity> entities) → SteeringManager - Restores UUIDs with references to GameEntity objects.
-
toJSON(
) → Map< String, dynamic> - Transforms this instance into a JSON object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited