void gameMemory_OnReset(object sender, EventArgs e) { if (Settings.AutoReset) { _timer.Reset(); } }
public void HandleLoadEnd(long timestamp, string zoneName) { if (settings.LoadRemovalEnabled) { loadTimes += timestamp - startTimestamp.GetValueOrDefault(timestamp); timer.CurrentState.IsGameTimePaused = false; timer.CurrentState.LoadingTimes = TimeSpan.FromMilliseconds(loadTimes); } IZone zone = Zone.Parse(zoneName, encounteredZones); if (settings.AutoSplitEnabled) { if (settings.CriteriaToSplit == ComponentSettings.SplitCriteria.Labyrinth) { if (labStarted && LAB_ENTRANCE.Equals(zone)) { timer.Reset(); labStarted = false; } else if (labStarted && (settings.LabSplitType == ComponentSettings.LabSplitMode.AllZones || (settings.LabSplitType == ComponentSettings.LabSplitMode.Trials && ASPIRANTS_TRIAL.Equals(zone)))) { timer.Split(); } } else if (settings.CriteriaToSplit == ComponentSettings.SplitCriteria.Zones) { if (ShouldSplitForCrtieraZone(zone)) { timer.Split(); } // Keep track of all encountered zones for part prediction. encounteredZones.Add(zone); } } previousZone = zone; }
/// <summary> /// Reset the timer and update corresponding values. /// </summary> void ResetTimerExecute() { _timer.Reset(); UpdateTimerValues(); }
public void StopTimerExecute() { _timer.Reset(); }