State class abstract
Base class for representing a state in context of State-driven agent design.
@author {@link https://github.com/Mugen87|Mugen87}
Constructors
- State()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
enter(
[GameEntity? owner]) → void - This method is called once during a state transition when the {@link StateMachine} makes this state active.
-
execute(
[GameEntity? owner]) → void - This method is called per simulation step if this state is active.
-
exit(
[GameEntity? owner]) → void - This method is called once during a state transition when the {@link StateMachine} makes this state inactive.
-
fromJSON(
Map< String, dynamic> json) → State - Restores this instance from the given JSON object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onMessage(
[GameEntity? owner, Telegram? telegram]) → bool - This method is called when messaging between game entities occurs.
-
resolveReferences(
[Map< String, GameEntity> ? owner]) → State - 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