public Application(LightEventConfig config) { Config = config; SettingsSavePath = Path.Combine(GetProfileFolderPath(), "settings.json"); config.Event.Application = this; Profiles = new ObservableCollection <ApplicationProfile>(); EffectScripts = new Dictionary <string, IEffectScript>(); ParameterLookup = Utils.GameStateUtils.ReflectGameStateParameters(config.GameStateType); }
public Application(LightEventConfig config) { Config = config; SettingsSavePath = Path.Combine(GetProfileFolderPath(), "settings.json"); config.Event.Application = this; config.Event.ResetGameState(); Profiles = new ObservableCollection <ApplicationProfile>(); Profiles.CollectionChanged += (sender, e) => { if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add) { foreach (ApplicationProfile prof in e.NewItems) { prof.SetApplication(this); } } }; EffectScripts = new Dictionary <string, IEffectScript>(); if (config.GameStateType != null) { ParameterLookup = Utils.GameStateUtils.ReflectGameStateParameters(config.GameStateType); } }
public bool RegisterProfile(LightEventConfig config) { return(RegisterEvent(new Application(config))); }
public LightEvent(LightEventConfig config) : this() { this.Config = config; }