private AbstractEntityPatch CreateEntityPatch(EntityReplicateOperationType type) { switch (type) { case EntityReplicateOperationType.Add: return(Patch.AddEntityPatch.Allocate()); case EntityReplicateOperationType.Del: return(DeleteEntityPatch.Allocate()); case EntityReplicateOperationType.Mod: return(ModifyEntityPatch.Allocate()); default: throw new Exception(string.Format("type {0} not exist", type)); } }
public override void DoDiffEntityStart(IGameEntity leftEntity, IGameEntity rightEntity) { var patch = ModifyEntityPatch.Allocate(rightEntity); currentEntityPatch = patch; }
public void OnDiffEntityStart(IGameEntity leftEntity, IGameEntity rightEntity) { var patch = ModifyEntityPatch.Allocate(rightEntity); _currentEntityPatch = patch; }