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.
- Listed in Items, inventory and logic
- Inherits or implements
AutomaticDockArea,INetworkEntityBehaviour - Documented in Items, interaction and damage
Constructors
| Member | What it is |
|---|---|
RejectDockArea() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|---|
private NetworkEntity entity | Backing field for Entity. |
private TransformHandler rejectEffect | Effect played at the reject position. |
private Transform rejectPosition | Where rejected items are moved to. |
private MethodSyncStruct<uint> syncEffect | Method sync carrying the rejected pickup's identifier. |
Properties
| Member | What it is |
|---|---|
NetworkEntity Entity { get; } | The network entity this area syncs through. |
Methods
| Member | What 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
| Member | What 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. |