public override void DoDiffEntityFinish(IGameEntity leftEntity, IGameEntity rightEntity)
 {
     if (currentEntityPatch.GetComponentPatchCount() > 0)
     {
         snapshotPatch.AddEntityPatch(currentEntityPatch);
     }
     //fix bug memory leak
     currentEntityPatch.ReleaseReference();
     currentEntityPatch = null;
 }
Exemplo n.º 2
0
 public void OnDiffEntityFinish(IGameEntity leftEntity, IGameEntity rightEntity)
 {
     if (_currentEntityPatch.GetComponentPatchCount() > 0)
     {
         _patch.AddEntityPatch(_currentEntityPatch);
     }
     //fix bug memory leak
     _currentEntityPatch.ReleaseReference();
     _currentEntityPatch = null;
 }
Exemplo n.º 3
0
        public void DeSerialize(BinaryReader reader, INetworkObjectSerializerManager serializerManager)
        {
            BaseSnapshotSeq = reader.ReadInt32();
            AssertUtility.Assert(_entityPatchList.Count == 0);
            var count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                AbstractEntityPatch patch = CreateEntityPatch((EntityReplicateOperationType)reader.ReadByte());
                patch.DeSerialize(reader, serializerManager);
                _entityPatchList.Add(patch);
            }
        }
        public override void DoDiffEntityStart(IGameEntity leftEntity, IGameEntity rightEntity)
        {
            var patch = ModifyEntityPatch.Allocate(rightEntity);

            currentEntityPatch = patch;
        }
Exemplo n.º 5
0
        public void OnDiffEntityStart(IGameEntity leftEntity, IGameEntity rightEntity)
        {
            var patch = ModifyEntityPatch.Allocate(rightEntity);

            _currentEntityPatch = patch;
        }
Exemplo n.º 6
0
 public void AddEntityPatch(AbstractEntityPatch entityPatch)
 {
     _entityPatchList.Add(entityPatch);
     entityPatch.AcquireReference();
 }