MethodSyncStruct<T>
A class in Root.Township, Alta.Networking.
A Sync for struct values that hands the read or write to a method you pass in. Optionally resets the value to a new struct before each read.
- Listed in Networking and servers
- Inherits or implements
Sync<T>
Constructors
| Member | What it is |
|---|---|
MethodSyncStruct(NetworkEntity entity, EntityMessageType messageType, SerializeMethod<T> method, bool isAlwaysRecreating = false) | Creates a MethodSyncStruct from entity, messageType, method and isAlwaysRecreating. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private bool isAlwaysRecreating | When true, the value is reset to a new T before each read. |
private SerializeMethod<T> method | The serialize method the message forwards to. |
Properties
| Member | What it is |
|---|---|
override SerializeMethod Handler { get; } | The serialize method the sync system calls. It resets the value first when reading with isAlwaysRecreating, then calls your method with the current value. |
Methods
1 private and internal method
Used in
Members of other types that take, return or hold a MethodSyncStruct<T>:
ActionItem.syncEffect, PlayerEffectController.remoteTeleportEffect, ForgedModel<TB, TA>.syncComplete, Recycler.syncOutputEffect, RecyclerOutputSlot.Setup, RecyclerOutputSlot.syncMethod, Smelter.syncEffects, TimberBlock.syncPickup, TimberBlock.syncPieceEffects, TimberBlock.syncStatus, TimberBlockSpawner.syncRotation, CaveTeleporterManager.syncEffect, CaveTeleporterManager.syncProxy, GenerationBase.clientSpawn, CaveLayerStreamer.syncLayerSetup, PlayerEntitySync.syncLoaded, Cookable.syncEffect, StewManager.syncFadeOutIngredient, ConfirmationCraftingPart.syncAttemptCraft, ConfirmationCraftingPart.syncClientNailHit, ConfirmationCraftingPart.syncNail, CraftingPart.attemptCraft, DecraftingComponent.syncDecraftingHit, GenericCraftingStation.syncClientNailHit, GenericCraftingStation.syncDestroyEffect, GenericCraftingStation.syncNailHit, GenericCraftingStation.syncPiece, GenericCraftingStation.syncPieceGrab, GenericCraftingStation.syncProjectStatus, JointSlot.syncInsert, GrassManager.sync, HitModifierEffect.syncHit, ImpactDetector.syncImpact, ImpactDetectorCentral.syncImpact, SparkSecondaryDetector.syncSpark, Agent.syncEvent, FireBug.syncDrag, SeedSpray.syncBasicImpact, Wyrm.syncGameObjects, PickupDocker.requestDock, RejectDockArea.syncEffect, LiquidContainerLid.syncOpen, MapManager.syncPieceDiscovery, PullAway.syncPull, ModifiableStaticManager.syncModification, NetworkColliderGroup.syncEnabled, NetworkColliderGroup.syncIgnore, NetworkRotation.syncStatus, Book.removePage, Book.serverFlipPage, Book.setHighlight, Book.setOpen, PositionRestrictor.resetLocation, PositionRestrictor.setHaptic, PositionRestrictor.syncItem, DownedState.syncTimerIncreaseToDownedPlayer, PlayerStateBase.requestStateChange, PlayerStateManager.syncStateChange, ActionItemsManager.syncSpawnedToClient, ActionItemsManager.syncSpawnRequestToServer and 85 more.