public void InitializeRecipient(NetworkRecipient recipient) { if (GetNetworkActor().IsServer()) { entitys_by_id.Values.Process(e => e.SendConstructReplay(recipient)); } }
public void SendConstructReplay(NetworkRecipient recipient) { if (GetNetworkActor().IsServer()) { constructor.SendConstructorReplay(constructor_system, recipient, constructor_arguments, this); } }
public override void SendFullUpdate(NetworkRecipient recipient) { if (GetNetworkActor().IsServer()) { GetSyncronizer().CreateMessage(MessageType.FullUpdateConstant, NetDeliveryMethod.ReliableUnordered, delegate(Buffer buffer) { buffer.WriteByte(GetIndex()); buffer.WriteCollection(constant_by_values.Values, c => WriteConstant(c, buffer)); }).Send(recipient); } }
public void SendConstructorReplay(System system, NetworkRecipient recipient, object[] arguments, Entity spawned_entity) { Syncronizer syncronizer = system.GetSyncronizer(); NetworkActor actor = syncronizer.GetNetworkActor(); syncronizer.CreateMessage(MessageType.InvokeSystemMethod, NetDeliveryMethod.ReliableOrdered, delegate(Buffer buffer) { buffer.WriteSystemReference(system); buffer.WriteSystemMethod(this); WriteArguments(arguments, buffer); if (actor.IsServer()) { buffer.WriteInt32(spawned_entity.GetId()); spawned_entity.WriteSync(buffer); } }).Send(recipient); }
public void SendFullUpdate(NetworkRecipient recipient) { constant_managers.Process(m => m.SendFullUpdate(recipient)); }
public void Send(NetworkRecipient recipient) { recipient.Send(envelope); }