Telegram class

Class for representing a telegram, an envelope which contains a message and certain metadata like sender and receiver. Part of the messaging system for game entities.

Constructors

Telegram(GameEntity sender, GameEntity receiver, String message, double delay, Map<String, dynamic>? data)
Constructs a new telegram object.
Telegram.fromJson(Map<String, dynamic> json)

Properties

data ↔ Map<String, dynamic>?
getter/setter pair
delay ↔ double
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
message ↔ String
getter/setter pair
receiver ↔ GameEntity
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sender ↔ GameEntity
getter/setter pair

Methods

fromJSON(Map<String, dynamic> json) → Telegram
Restores this instance from the given JSON object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveReferences(Map<String, GameEntity> entities) → Telegram
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