Example #1
0
        public SekiroComponent(LiveSplitState state)
        {
            _control           = new SekiroControl();
            _timeFormatter     = new RegularTimeFormatter(TimeAccuracy.Hundredths);
            _infoTimeComponent = new InfoTimeComponent(ComponentName, TimeSpan.Zero, _timeFormatter);

            state.OnReset += delegate { _oldMillis = 0; };
            state.OnReset += delegate { _oldMillis = 0; };

            _pointer = new SekiroPointer();
        }
Example #2
0
        public Ds3Component(LiveSplitState state)
        {
            _control           = new Ds3Control();
            _timeFormatter     = new RegularTimeFormatter(TimeAccuracy.Hundredths);
            _infoTimeComponent = new InfoTimeComponent(ComponentName, TimeSpan.Zero, _timeFormatter);
            _infoTimeComponent = new InfoTimeComponent(ComponentName, TimeSpan.Zero, _timeFormatter);

            state.OnReset += delegate {
                _oldMillis = 0;
            };

            state.OnStart += delegate {
                _oldMillis = 0;
            };

            Pointer = new Ds3Pointer();

            _splitter = new Ds3AutoSplitter(state, _control.splitSettings);
        }
Example #3
0
        public SourceSplitComponent(LiveSplitState state)
        {
            this.Settings          = new SourceSplitSettings();
            this.InternalComponent = new InfoTimeComponent("Game Time", null, new RegularTimeFormatter(TimeAccuracy.Hundredths));

            this.ContextMenuControls = new Dictionary <String, Action>();
            this.ContextMenuControls.Add("SourceSplit: Map Times", () => {
                if (_mapTimesForm.Visible)
                {
                    _mapTimesForm.Hide();
                }
                else
                {
                    _mapTimesForm.Show();
                }
            });

            _cache = new GraphicsCache();

            _timer = new TimerModel {
                CurrentState = state
            };
            state.OnSplit += state_OnSplit;
            state.OnReset += state_OnReset;
            state.OnStart += state_OnStart;
            _state         = state;

            _mapTimes     = new List <MapTime>();
            _mapsVisited  = new List <string>();
            _mapTimesForm = new MapTimesForm();

            _gameMemory = new GameMemory(this.Settings);
            _gameMemory.OnSignOnStateChange += gameMemory_OnSignOnStateChange;
            _gameMemory.OnGameTimeUpdate    += gameMemory_OnGameTimeUpdate;
            _gameMemory.StartReading();
        }