Beispiel #1
0
        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();
        }
Beispiel #2
0
        /// <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;
            }
        }
Beispiel #3
0
        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);
        }