A class in Root.Township, Alta.Heat.
The heat points on an entity, synced together as one block whenever any of them changes. See the heat guide.
Constructors
| Member | What it is |
|---|
HeatPointCollection() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
1 private and internal field
| Member | What it is |
|---|
private bool isForceSending | Set by SyncAllChildren so the next delta write sends even if no point changed. |
Properties
| Member | What it is |
|---|
protected override bool IsUsingSyncMessage { get; } | False: heat points sync through regular entity serialization, not their own message. |
3 private and internal properties
| Member | What it is |
|---|
private int Alta.Networking.INetworkSerialized.MaximumBits { get; } | Upper bound on the sync size: 22 bits per heat point plus 2. |
private AccumulativeAverageCount Alta.Networking.INetworkSerialized.PrepareForWriteTimer { get; } | Shared profiling timer for PrepareForWrite. |
private AccumulativeAverageCount Alta.Networking.INetworkSerialized.SerializeTimer { get; } | Shared profiling timer for Serialize. |
Methods
| Member | What it is |
|---|
void DeRegisterToChildrenUpdate(Action<HeatPoint> callBack) | Removes that callback from every heat point. |
bool PrepareForWrite(bool isWriteFull) | True if a forced send is pending or any heat point needs syncing. |
void RegisterToChildrenUpdate(Action<HeatPoint> callBack, bool isCallingOnRegister = true) | Subscribes a callback to every heat point's change event, optionally calling it once for each now. |
void Reset() | Disables every heat point. |
void Serialize(Stream stream, bool isWriteFull) | Writes or reads all heat points. |
override void SyncAllChildren() | Marks every heat point to be sent on the next pass. |
Used in
Members of other types that take, return or hold a HeatPointCollection: