示例#1
0
 public virtual void Serialize(NetworkBinaryWriter writer, SerializationModeFlags mode)
 {
     #if NETWORK_PROFILING
     using (new NetworkProfilingScope(this))
     #endif
     checked
     {
         if (mode.HasFlag(SerializationModeFlags.ConstantDataFromServer) ||
             mode.HasFlag(SerializationModeFlags.ConstantDataFromClient))
         {
             writer.Write((string)Name);
         }
         if (mode.HasFlag(SerializationModeFlags.VaryingDataFromServer))
         {
             writer.Write((bool)IsDisconnected);
             writer.WriteID(Team);
         }
         StatsData.Serialize(writer, mode);
         ArenaStatistics.Serialize(writer, mode);
     }
 }