예제 #1
0
 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);
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 public bool RegisterProfile(LightEventConfig config)
 {
     return(RegisterEvent(new Application(config)));
 }
예제 #4
0
 public LightEvent(LightEventConfig config) : this()
 {
     this.Config = config;
 }