Skip to main content

HeatPointCollection

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​

MemberWhat it is
HeatPointCollection()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

MemberWhat it is
static AccumulativeAverageCount prepareForWriteTimerShared timing stats for preparing to send.
static AccumulativeAverageCount serializeTimerShared timing stats for serializing.
1 private and internal field
MemberWhat it is
private bool isForceSendingSet by SyncAllChildren so the next delta write sends even if no point changed.

Properties​

MemberWhat it is
protected override bool IsUsingSyncMessage { get; }False: heat points sync through regular entity serialization, not their own message.
3 private and internal properties
MemberWhat 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​

MemberWhat 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: