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) => { OnStart(); }; state.OnSplit += (sender, args) => { splitCollection.OnSplit(); UpdateRunState(); }; state.OnUndoSplit += (sender, args) => { splitCollection.OnUndoSplit(); UpdateRunState(); }; state.OnSkipSplit += (sender, args) => { splitCollection.OnSkipSplit(); UpdateRunState(); }; state.OnReset += (sender, value) => { OnReset(); }; } Refresh(state.CurrentPhase); }
/// <summary> /// Called when the timer splits. /// </summary> private void OnSplit(object sender, EventArgs e) { splitCollection.OnSplit(); }