public float GetTotalDuration(List <uint> predictedSnapshotIds, PredictedSnapshotsStorage predictedSnapshotsStorage) { float duration = predictedSnapshotIds .Sum(id => predictedSnapshotsStorage.GetByInputId(id).physicsSimulationDuration); return(duration); }
public SimulationCorrector(PlayerPredictor playerPredictor, AverageInputManager averageInputManager, ClientInputMessagesHistory clientInputMessagesHistory, PredictedSnapshotsStorage predictedSnapshotsStorage) { this.playerPredictor = playerPredictor; this.averageInputManager = averageInputManager; this.clientInputMessagesHistory = clientInputMessagesHistory; this.predictedSnapshotsStorage = predictedSnapshotsStorage; }
public PredictionChecker(PlayerEntityComparer playerEntityComparer, PredictedSnapshotsStorage predictedSnapshotsStorage) { this.playerEntityComparer = playerEntityComparer; this.predictedSnapshotsStorage = predictedSnapshotsStorage; }