コード例 #1
0
ファイル: SVarsComponent.cs プロジェクト: Gartley/ss13remake
 public void DoSetSVar(MarshalComponentParameter svar)
 {
     Owner.SendComponentNetworkMessage(this, NetDeliveryMethod.ReliableUnordered, ComponentMessageType.SetSVar,
                                       svar.Serialize());
 }
コード例 #2
0
 /// <summary>
 /// Sends an SVar to the server to be set on the server-side entity.
 /// </summary>
 /// <param name="sendingEntity"></param>
 /// <param name="svar"></param>
 public void SendSVar(Entity sendingEntity, MarshalComponentParameter svar)
 {
     NetOutgoingMessage message = CreateEntityMessage();
     message.Write((byte)EntityMessage.SetSVar);
     message.Write(sendingEntity.Uid);
     svar.Serialize(message);
     _networkManager.SendMessage(message, NetDeliveryMethod.ReliableUnordered);
 }