private void OnReset() { if (memory.ProcessHooked && masterControl.ResetEquipmentIndexes) { memory.ResetEquipmentIndexes(); } // Other run state values don't need to be reset (since they're always properly set before becoming // relevant). run.GameTime = 0; run.MaxGameTime = 0; splitCollection.OnReset(); }
/// <summary> /// Called when the timer is reset. /// </summary> private void OnReset(object sender, TimerPhase e) { splitCollection.OnReset(); foreach (AutosplitDataClass dataClass in dataClasses) { dataClass.Reset(); } // This check prevents the timer from resetting and immediately restarting when you reset the timer in-game. if (!fileSelected) { runStarted = false; } }
public void Update(IInvalidator invalidator, LiveSplitState state, float width, float height, LayoutMode mode) { if (timer == null) { timer = new TimerModel(); timer.CurrentState = state; state.OnStart += (sender, args) => { splitCollection.OnStart(); }; state.OnSplit += (sender, args) => { splitCollection.OnSplit(); }; state.OnUndoSplit += (sender, args) => { splitCollection.OnUndoSplit(); }; state.OnSkipSplit += (sender, args) => { splitCollection.OnSkipSplit(); }; state.OnReset += (sender, value) => { splitCollection.OnReset(); }; } Refresh(state.CurrentPhase); }