Ejemplo n.º 1
0
        public void Init(object gameInstance)
        {
            Static = this;
            var path = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(typeof(Plugin).Assembly.CodeBase).Path));

            Configuration.TokenConfig.Init(path);
            Configuration.PluginConfig.Init(path);

            Logger               = new Logger();
            _dataHandler         = new DataHandler(path);
            _streamlabsData      = new StreamlabsData(_dataHandler);
            _twitchExtensionData = new TwitchExtensionData(_dataHandler);

            //MyScreenManager.ScreenAdded += ScreenAdded;
        }
Ejemplo n.º 2
0
        public void Init(object gameInstance)
        {
            Static = this;
            var path = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().Location).Path));

            Configuration.TokenConfig.Init(path);
            Configuration.PluginConfig.Init(path);

            Logger               = new Logger();
            DataHandler          = new DataHandler(path, this);
            _streamlabsData      = new StreamlabsData(DataHandler, this);
            _twitchExtensionData = new TwitchExtensionData(DataHandler, this);

            var harmony = new Harmony("se.gorymoon.streamengineer");

            harmony.PatchAll(Assembly.GetExecutingAssembly());

            Started = true;
            DeferredActions.ForEach(a => a.Invoke());
            MyScreenManager.ScreenAdded += ScreenAdded;
        }