Ejemplo n.º 1
0
        public void OnStart()
        {
            if (Instance != null)
            {
                return;
            }
            Instance = this;

            // create playlists folder if needed
            if (!Directory.Exists(DataPath))
            {
                Directory.CreateDirectory(DataPath);
            }

            Dispatcher.Initialize();

            // create our internal webclient
            WebClient = new WebClient();

            // create udp listener
            UdpListener = new UdpListener();

            SongBrowserPluginPresent = IPA.Loader.PluginManager.GetPlugin("Song Browser") != null;

            // setup handle for fresh menu scene changes
            BS_Utils.Utilities.BSEvents.OnLoad();
            BS_Utils.Utilities.BSEvents.menuSceneLoadedFresh += OnMenuSceneLoadedFresh;

            // keep track of active scene
            BS_Utils.Utilities.BSEvents.menuSceneActive += () => { IsAtMainMenu = true; };
            BS_Utils.Utilities.BSEvents.gameSceneActive += () => { IsAtMainMenu = false; };

            // init sprites
            Base64Sprites.Init();
        }
Ejemplo n.º 2
0
        public void OnStart()
        {
            if (Instance != null)
            {
                return;
            }
            Instance = this;

            // create SRM UserDataFolder folder if needed, or rename old streamcore folder
            if (!Directory.Exists(DataPath))
            {
                if (Directory.Exists(OldDataPath))
                {
                    Directory.Move(OldDataPath, DataPath);
                }
                else
                {
                    Directory.CreateDirectory(DataPath);
                }
            }

            // initialize config
            RequestBotConfig = new RequestBotConfig();

            Dispatcher.Initialize();

            // create our internal webclient
            WebClient = new WebClient();

            // create udp listener
            UdpListener = new UdpListener();

            SongBrowserPluginPresent = IPA.Loader.PluginManager.GetPlugin("Song Browser") != null;
            ChatCorePluginPresent    = IPA.Loader.PluginManager.GetPlugin("ChatCore") != null;

            // setup handle for fresh menu scene changes
            BS_Utils.Utilities.BSEvents.OnLoad();
            BS_Utils.Utilities.BSEvents.lateMenuSceneLoadedFresh += OnLateMenuSceneLoadedFresh;

            // init sprites
            Base64Sprites.Init();
        }