Пример #1
0
        public SplitterComponent(LiveSplitState state)
        {
            mem      = new SplitterMemory();
            settings = new SplitterSettings();

            foreach (LogObject key in Enum.GetValues(typeof(LogObject)))
            {
                currentValues[key] = "";
            }

            if (state != null)
            {
                Model = new TimerModel()
                {
                    CurrentState = state
                };
                Model.InitializeGameTime();
                Model.CurrentState.IsGameTimePaused = true;
                state.OnReset     += OnReset;
                state.OnPause     += OnPause;
                state.OnResume    += OnResume;
                state.OnStart     += OnStart;
                state.OnSplit     += OnSplit;
                state.OnUndoSplit += OnUndoSplit;
                state.OnSkipSplit += OnSkipSplit;
            }

            ContextMenuControls = new Dictionary <string, Action>();
            ContextMenuControls.Add("Add enter split", () => AddLevelSplit(false));
            ContextMenuControls.Add("Add exit split", () => AddLevelSplit(true));
            ContextMenuControls.Add("Auto add enter splits", () => { autoAdding = true; autoAddingExit = false; });
            ContextMenuControls.Add("Auto add exit splits", () => { autoAdding = true; autoAddingExit = true; });
        }
Пример #2
0
 public SplitterComponent(object model)
 {
     mem      = new SplitterMemory();
     settings = new SplitterSettings();
     foreach (LogObject key in Enum.GetValues(typeof(LogObject)))
     {
         currentValues[key] = "";
     }
 }