EffectSnapshot class

A serialisable point-in-time snapshot of all active effects across all entities.

Suitable for network transmission (late-join, reconnect) and for prediction-rollback checkpoints. Convert to JSON with EffectSnapshot.toJson or to compact bytes with EffectBinaryCodec.

Constructors

EffectSnapshot({required int tick, required Map<EntityId, List<Map<String, dynamic>>> entityEffects})
const
EffectSnapshot.fromJson(Map<String, dynamic> json)
Deserialise from a JSON-compatible map.
factory

Properties

entityEffects Map<EntityId, List<Map<String, dynamic>>>
Map from EntityId to the JSON-encoded list of in-flight effects, as produced by EffectPlayer.toJson.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tick int
The absolute tick count at which this snapshot was captured.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialise to a JSON-compatible map.
toString() String
A string representation of this object.
inherited

Operators

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