コード例 #1
0
 public virtual void OnReplicationSerialize_CJGenerated(P2PNetworkWriter writer, bool initial_state)
 {
     writer.Write(this.m_BestTriggerReplObj_Repl);
     writer.Write(this.m_ExecutedTriggerReplObj_Repl);
     if (this.m_BestTriggerChildIdx_Repl == null)
     {
         writer.WritePackedUInt32(0u);
     }
     else
     {
         writer.WritePackedUInt32((uint)this.m_BestTriggerChildIdx_Repl.Count);
         for (int i = 0; i < this.m_BestTriggerChildIdx_Repl.Count; i++)
         {
             writer.Write(this.m_BestTriggerChildIdx_Repl[i]);
         }
     }
     if (this.m_ExecutedTriggerChildIdx_Repl == null)
     {
         writer.WritePackedUInt32(0u);
         return;
     }
     writer.WritePackedUInt32((uint)this.m_ExecutedTriggerChildIdx_Repl.Count);
     for (int j = 0; j < this.m_ExecutedTriggerChildIdx_Repl.Count; j++)
     {
         writer.Write(this.m_ExecutedTriggerChildIdx_Repl[j]);
     }
 }
コード例 #2
0
 public virtual void OnReplicationSerialize_CJGenerated(P2PNetworkWriter writer, bool initial_state)
 {
     if (this.m_ReplActiveElements_Repl == null)
     {
         writer.WritePackedUInt32(0u);
     }
     else
     {
         writer.WritePackedUInt32((uint)this.m_ReplActiveElements_Repl.Length);
         for (int i = 0; i < this.m_ReplActiveElements_Repl.Length; i++)
         {
             writer.Write(this.m_ReplActiveElements_Repl[i]);
         }
     }
     if (initial_state)
     {
         if (this.m_ReplActiveElementsHash == null)
         {
             writer.WritePackedUInt32(0u);
             return;
         }
         writer.WritePackedUInt32((uint)this.m_ReplActiveElementsHash.Length);
         for (int j = 0; j < this.m_ReplActiveElementsHash.Length; j++)
         {
             writer.Write(this.m_ReplActiveElementsHash[j]);
         }
     }
 }
コード例 #3
0
 public virtual void OnReplicationSerialize_CJGenerated(P2PNetworkWriter writer, bool initial_state)
 {
     if (this.m_Rotation_Repl == null)
     {
         writer.WritePackedUInt32(0u);
         return;
     }
     writer.WritePackedUInt32((uint)this.m_Rotation_Repl.Length);
     for (int i = 0; i < this.m_Rotation_Repl.Length; i++)
     {
         writer.Write(this.m_Rotation_Repl[i]);
     }
 }
コード例 #4
0
 public override void OnReplicationSerialize(P2PNetworkWriter writer, bool initial_state)
 {
     writer.Write(this.m_PlantDestroyed);
     if (this.m_PlantDestroyed)
     {
         writer.Write(this.m_ActivateScripts);
         writer.Write(this.m_DontDestroy);
         writer.Write(this.m_Layer);
         ItemReplacer component = base.GetComponent <ItemReplacer>();
         if (component != null)
         {
             writer.WritePackedUInt32((uint)component.m_DestroyOnReplace.Count);
             for (int i = 0; i < component.m_DestroyOnReplace.Count; i++)
             {
                 writer.Write(component.m_DestroyOnReplace[i]);
             }
             return;
         }
         writer.WritePackedUInt32(0u);
     }
 }
コード例 #5
0
 public override void OnReplicationSerialize(P2PNetworkWriter writer, bool initialState)
 {
     if (!initialState)
     {
         writer.WritePackedUInt32((uint)this.m_ReplDestroyedObject.Count);
         for (int i = 0; i < this.m_ReplDestroyedObject.Count; i++)
         {
             writer.Write(this.m_ReplDestroyedObject[i]);
         }
         this.m_ReplDestroyedObject.Clear();
     }
 }
コード例 #6
0
 public override void OnReplicationSerialize(P2PNetworkWriter writer, bool initial_state)
 {
     base.OnReplicationSerialize(writer, initial_state);
     using (P2PNetworkWriterSeekHelper p2PNetworkWriterSeekHelper = new P2PNetworkWriterSeekHelper(writer))
     {
         writer.WritePackedUInt32(0u);
         uint num = 0u;
         foreach (ReplicatedPlayerInjuries.ReplicatedWoundSlot replicatedWoundSlot in this.m_WoundSlots)
         {
             if (replicatedWoundSlot.IsInjury())
             {
                 writer.Write((int)replicatedWoundSlot.m_InjuryData.type);
                 writer.Write((int)replicatedWoundSlot.m_InjuryData.state);
                 writer.Write(replicatedWoundSlot.m_SlotIndex);
                 num += 1u;
             }
         }
         p2PNetworkWriterSeekHelper.SeekToStoredPos();
         writer.WritePackedUInt32(num);
     }
 }
コード例 #7
0
 public override void OnReplicationSerialize(P2PNetworkWriter writer, bool initial_state)
 {
     if (!initial_state)
     {
         using (P2PNetworkWriterSeekHelper p2PNetworkWriterSeekHelper = new P2PNetworkWriterSeekHelper(writer))
         {
             writer.WritePackedUInt32(0u);
             uint num = 0u;
             for (int i = 0; i < this.m_ReplBalanceObjects.Count; i++)
             {
                 if (this.m_ReplBalanceObjects[i] != null)
                 {
                     this.m_ReplBalanceObjects[i].Serialize(writer);
                     num += 1u;
                 }
             }
             p2PNetworkWriterSeekHelper.SeekToStoredPos();
             writer.WritePackedUInt32(num);
         }
         this.m_ReplBalanceObjects.Clear();
         using (P2PNetworkWriterSeekHelper p2PNetworkWriterSeekHelper2 = new P2PNetworkWriterSeekHelper(writer))
         {
             writer.WritePackedUInt32(0u);
             uint num2 = 0u;
             for (int j = 0; j < this.m_ReplDestroyedBalanceObjects.Count; j++)
             {
                 if (this.m_ReplDestroyedBalanceObjects[j] != null)
                 {
                     this.m_ReplDestroyedBalanceObjects[j].Serialize(writer);
                     num2 += 1u;
                 }
             }
             p2PNetworkWriterSeekHelper2.SeekToStoredPos();
             writer.WritePackedUInt32(num2);
         }
         this.m_ReplDestroyedBalanceObjects.Clear();
     }
 }
コード例 #8
0
 public override void Serialize(P2PNetworkWriter writer)
 {
     writer.WritePackedUInt32((uint)this.value);
 }