コード例 #1
0
 public virtual void Load(BaseNetworkable.LoadInfo info)
 {
     if (info.msg.baseNetworkable == null)
     {
         return;
     }
     ProtoBuf.BaseNetworkable baseNetworkable = info.msg.baseNetworkable;
     if (this.prefabID != baseNetworkable.prefabID)
     {
         UnityEngine.Debug.LogError(string.Concat(new object[] { "Prefab IDs don't match! ", this.prefabID, "/", baseNetworkable.prefabID, " -> ", base.gameObject }), base.gameObject);
     }
 }
コード例 #2
0
 public void CopyTo(BaseNetworkable instance)
 {
     instance.uid      = this.uid;
     instance.@group   = this.@group;
     instance.prefabID = this.prefabID;
 }
コード例 #3
0
 public virtual void WriteToStream(Stream stream)
 {
     BaseNetworkable.Serialize(stream, this);
 }
コード例 #4
0
 public byte[] ToProtoBytes()
 {
     return(BaseNetworkable.SerializeToBytes(this));
 }
コード例 #5
0
 public void ToProto(Stream stream)
 {
     BaseNetworkable.Serialize(stream, this);
 }
コード例 #6
0
 public static void SerializeLengthDelimited(Stream stream, BaseNetworkable instance)
 {
     byte[] bytes = BaseNetworkable.SerializeToBytes(instance);
     ProtocolParser.WriteUInt32(stream, (uint)bytes.Length);
     stream.Write(bytes, 0, (int)bytes.Length);
 }
コード例 #7
0
 public void ResetToPool()
 {
     BaseNetworkable.ResetToPool(this);
 }
コード例 #8
0
 public virtual void ReadFromStream(Stream stream, int size, bool isDelta = false)
 {
     BaseNetworkable.DeserializeLength(stream, size, this, isDelta);
 }
コード例 #9
0
 public void FromProto(Stream stream, bool isDelta = false)
 {
     BaseNetworkable.Deserialize(stream, this, isDelta);
 }