Skip to main content

ImpactDetectorCentral

A class in Root.Township, Alta.Impact.

Sends impact syncs for all the ImpactDetector components on one entity through a single method sync, with the detector's index in the message. Both sides.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private ImpactDetector[] availableDetectorsThe ImpactDetector components on this object, found automatically.
private MethodSyncStruct<ImpactDetectorCentral.CentralizedArguments> syncImpactThe shared impact method sync.

Methods​

MemberWhat it is
override void Initialize()Creates the syncImpact method sync.
void SendArguments(ImpactDetector detector, ImpactDetector.ImpactSyncArguments arguments)Sends an impact for one of the entity's detectors to the chunk.
1 private and internal method
MemberWhat it is
private void SyncImpact(IPlayer player, Stream stream, ImpactDetectorCentral.CentralizedArguments arguments)Method sync handler: writes or reads which detector it is, then lets that detector sync the impact.

Used in​

Members of other types that take, return or hold a ImpactDetectorCentral: