Esempio n. 1
0
 public override void OnReplicationDeserialize(P2PNetworkReader reader, bool initial_state)
 {
     base.OnReplicationDeserialize(reader, initial_state);
     this.m_ReplCurrentHitsCount = reader.ReadInt32();
     DebugUtils.Assert(this.m_ReplConstructionSlots.Length == this.m_ConstructionSlots.Length, true);
     for (int i = 0; i < this.m_ReplConstructionSlots.Length; i++)
     {
         this.m_ReplConstructionSlots[i].obj         = reader.ReadReplicatedGameObject();
         this.m_ReplConstructionSlots[i].is_resolved = false;
     }
 }
 public override void OnReplicationDeserialize(P2PNetworkReader reader, bool initial_state)
 {
     this.m_PlantDestroyed = reader.ReadBoolean();
     if (this.m_PlantDestroyed)
     {
         this.m_ActivateScripts = reader.ReadBoolean();
         this.m_DontDestroy     = reader.ReadBoolean();
         this.m_Layer           = reader.ReadInt32();
         uint num = reader.ReadPackedUInt32();
         if (num > 0u && this.m_DestroyOnReplace == null)
         {
             this.m_DestroyOnReplace = new List <ReplicatedGameObject>((int)num);
         }
         int num2 = 0;
         while ((long)num2 < (long)((ulong)num))
         {
             this.m_DestroyOnReplace.Add(reader.ReadReplicatedGameObject());
             num2++;
         }
     }
 }