public DarkSouls100Tracker(LiveSplitState state)
        {
            // Sets the initial varialbes
            this.state = state;
            tracker    = new DarkSoulsMemory();
            progress   = new GameProgress();

            // Subscribe to the gameProgress event
            tracker.OnGameProgressUpdated += GameTracker_OnGameProgressUpdated;

            // Subscribe to the Start and Reset events of Livesplit
            this.state.OnReset += _state_OnReset;
            this.state.OnStart += _state_OnStart;

            // Create the settings and subscribe to the Events mean to update settings and the detailed view
            Settings = new DarkSouls100TrackerSettings()
            {
                CurrentState = state
            };
            Settings.OnDetailedSettingsChanged += Settings_OnDetailedSettingsChanged;
            Settings.OnToggleDetails           += Settings_OnToggleDetails;
            Settings.OnSettingsLoaded          += Settings_OnSettingsLoaded;

            // Creates the Text component (variant of the normal Text componant with different Font behavior)
            this.InternalComponent = new PercentageTextComponent("Progression", "-", Settings);

            // Starts the splits if the timer is already running
            if (state.IsGameTimeInitialized)
            {
                tracker.Start();
            }
        }
Exemple #2
0
 public PercentageTextComponent(string Name, string Value, DarkSouls100TrackerSettings settings)
     : base(Name, Value)
 {
     Settings = settings;
 }