MovingEntity class

Class representing moving game entities.

@author {@link https://github.com/Mugen87|Mugen87}

Inheritance
Implementers

Constructors

MovingEntity()
Constructs a new moving entity.

Properties

active ↔ bool
getter/setter pairinherited
boundingRadius ↔ double
getter/setter pairinherited
canActivateTrigger ↔ bool
getter/setter pairinherited
children → List<GameEntity>
finalinherited
displacement → Vector3
final
forward → Vector3
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
manager ↔ EntityManager?
getter/setter pairinherited
maxSpeed ↔ double
getter/setter pair
maxTurnRate ↔ double
getter/setter pairinherited
name ↔ String
getter/setter pairinherited
neighborhoodRadius ↔ double
getter/setter pairinherited
neighbors → List<GameEntity>
finalinherited
parent ↔ GameEntity?
getter/setter pairinherited
position → Vector3
finalinherited
positionWorld → Vector3
finalinherited
quaternionWorld → Quaternion
finalinherited
renderComponent ↔ dynamic
getter/setter pairinherited
renderComponentCallback ↔ Function?
getter/setter pairinherited
rotation → Quaternion
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale → Vector3
finalinherited
started ↔ bool
getter/setter pairinherited
target → Vector3
final
targetDirection → Vector3
finalinherited
targetRotation → Quaternion
finalinherited
up → Vector3
finalinherited
updateNeighborhood ↔ bool
getter/setter pairinherited
updateOrientation ↔ bool
getter/setter pair
uuid → String?
Unique ID, primarily used in context of serialization/deserialization.
no setterinherited
velocity ↔ Vector3
getter/setter pair
vision ↔ Vision?
getter/setter pairinherited

Methods

add(GameEntity entity) → GameEntity
Adds a game entity as a child to this game entity.
inherited
entitiesToIds(dynamic array) → dynamic
inherited
fromJSON(Map<String, dynamic> json) → MovingEntity
Restores this instance from the given JSON object.
override
getDirection(Vector3 result) → Vector3
Computes the current direction (forward) vector of this game entity and stores the result in the given vector.
inherited
getSpeed() → double
Returns the current speed of this game entity.
getSpeedSquared() → double
Returns the current speed in squared space of this game entity.
getWorldDirection(Vector3 result) → Vector3
Computes the current direction (forward) vector of this game entity in world space and stores the result in the given vector.
inherited
getWorldPosition(Vector3 result) → Vector3
Computes the current position of this game entity in world space and stores the result in the given vector.
inherited
handleMessage(Telegram telegram) → bool
Holds the implementation for the message handling of this game entity.
inherited
lineOfSightTest(Ray ray, Vector3 intersectionPoint) → Vector3?
Holds the implementation for the line of sight test of this game entity. This method is used by {@link Vision#visible} in order to determine whether this game entity blocks the given line of sight or not. Implement this method when your game entity acts as an obstacle.
inherited
lookAt(Vector3 target) → GameEntity
Directly rotates the entity so it faces the given target position.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(GameEntity entity) → GameEntity
Removes a game entity as a child from this game entity.
inherited
resolveReferences(Map<String, GameEntity> entities) → GameEntity
Restores UUIDs with references to GameEntity objects.
inherited
rotateTo(Vector3 target, double delta, [double? tolerance]) → bool
Given a target position, this method rotates the entity by an amount not greater than {@link GameEntity#maxTurnRate} until it directly faces the target.
inherited
sendMessage(GameEntity receiver, String message, [double delay = 0, Map<String, dynamic>? data]) → GameEntity
Sends a message with the given data to the specified receiver.
inherited
setRenderComponent([dynamic renderComponent, Function? callback]) → GameEntity
Sets a renderable component of a 3D engine with a sync callback for this game entity.
inherited
start() → GameEntity
Executed when this game entity is updated for the first time by its {@link EntityManager}.
inherited
toJSON() → Map<String, dynamic>
Transforms this instance into a JSON object.
override
toString() → String
A string representation of this object.
inherited
update(double delta) → MovingEntity
Updates the internal state of this game entity.
override
updateWorldMatrix() → GameEntity
inherited
worldMatrix() → Matrix4
A transformation matrix representing the world space of this game entity.
inherited

Operators

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