Vision class

Class for representing the vision component of a game entity.

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

Constructors

Vision([GameEntity? owner])
Constructs a new vision object.

Properties

direction Vector3
final
fieldOfView double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
intersectionPoint Vector3
final
obstacles List<GameEntity>
final
owner GameEntity?
getter/setter pair
range double
getter/setter pair
ray Ray
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toPoint Vector3
final
worldPosition Vector3
final

Methods

addObstacle(GameEntity obstacle) Vision
Adds an obstacle to this vision instance.
fromJSON(Map<String, dynamic> json) Vision
Restores this instance from the given JSON object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeObstacle(GameEntity obstacle) Vision
Removes an obstacle from this vision instance.
resolveReferences(Map<String, GameEntity> entities) Vision
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
visible(Vector3 point) bool
Performs a line of sight test in order to determine if the given point in 3D space is visible for the game entity.

Operators

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