Skip to main content

RejectDockArea

A class in Root.Township, Alta.Inventory.

An automatic dock area that moves rejected items to a set spot and plays an effect there. The server moves the item and syncs the effect to clients.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private NetworkEntity entityBacking field for Entity.
private TransformHandler rejectEffectEffect played at the reject position.
private Transform rejectPositionWhere rejected items are moved to.
private MethodSyncStruct<uint> syncEffectMethod sync carrying the rejected pickup's identifier.

Properties​

MemberWhat it is
NetworkEntity Entity { get; }The network entity this area syncs through.

Methods​

MemberWhat it is
protected override void HandleReject(Pickup pickup)Server: moves a rejected pickup to rejectPosition, plays the effect and tells clients.
6 private and internal methods
MemberWhat it is
private void Alta.Networking.INetworkEntityBehaviour.Initialize()Creates the effect method sync.
private void Alta.Networking.INetworkEntityBehaviour.InitializeAsServer(SpawnData spawnData)Empty.
private void Alta.Networking.INetworkEntityBehaviour.OnConnected(Player player)Empty.
private void Alta.Networking.INetworkEntityBehaviour.OnDisconnected(Player player)Empty.
private void PlayEffect()Plays the reject effect at rejectPosition unless headless.
private void SyncEffect(IPlayer player, Stream stream, uint pickupIdentifier)Sends the rejected pickup's identifier; remote clients move that pickup and play the effect.