MemorySystem class

Class for representing the memory system of a game entity. It is used for managing, filtering, and remembering sensory input.

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

Constructors

MemorySystem([GameEntity? owner])
Constructs a new memory system.

Properties

hashCode int
The hash code for this object.
no setterinherited
memorySpan double
getter/setter pair
owner GameEntity?
getter/setter pair
records List<MemoryRecord>
final
recordsMap Map<GameEntity, MemoryRecord>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() MemorySystem
Removes all memory records from the memory system.
createRecord(GameEntity entity) MemorySystem
Creates a memory record for the given game entity.
deleteRecord(GameEntity entity) MemorySystem
Deletes the memory record for the given game entity.
fromJSON(Map<String, dynamic> json) MemorySystem
Restores this instance from the given JSON object.
getRecord(GameEntity entity) MemoryRecord?
Returns the memory record of the given game entity.
getValidMemoryRecords(double currentTime, List<MemoryRecord> result) List<MemoryRecord>
Determines all valid memory record and stores the result in the given array.
hasRecord(GameEntity entity) bool
Returns true if there is a memory record for the given game entity.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveReferences(Map<String, GameEntity> entities) MemorySystem
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