public GenericData(int size) { states = new T[size]; stateTicks = new SparseTickBuffer(size); predictions = new T[size]; predictionTicks = new SparseTickBuffer(size); }
public NetworkPredictedDataHandler(EntityManager entityManager, Entity entity) { this.entityManager = entityManager; this.entity = entity; #if UNITY_EDITOR serverStateTicks = new SparseTickBuffer(ReplicatedEntityCollection.HistorySize); serverStates = new T[ReplicatedEntityCollection.HistorySize]; // predictedStateTicks = new SparseTickBuffer(ReplicatedEntityCollection.HistorySize); predictedStates = new T[ReplicatedEntityCollection.HistorySize * ReplicatedEntityCollection.PredictionSize]; #endif }
public PredictedComponentSerializer(EntityManager entityManager, Entity entity, IEntityReferenceSerializer refSerializer) { context.entityManager = entityManager; context.entity = entity; context.refSerializer = refSerializer; #if UNITY_EDITOR serverStateTicks = new SparseTickBuffer(ReplicatedEntityCollection.HistorySize); serverStates = new T[ReplicatedEntityCollection.HistorySize]; // predictedStateTicks = new SparseTickBuffer(ReplicatedEntityCollection.HistorySize); predictedStates = new T[ReplicatedEntityCollection.HistorySize * ReplicatedEntityCollection.PredictionSize]; #endif }