示例#1
0
        internal static void Setup()// This is the initial setup function, it should only be called a single time, and only by the loader itself.
        {
            if (_setup)
            {
                throw new NotSupportedException("Blocked attempt to call MainMenu.Setup() a second time.");
            }
            _setup = true;//now we have run setup!

            SiscosHooks.register(HOOK_ID.Level_Loaded, MainMenu.onLevelLoaded);

            State = new Active_State_Tracker("MAIN_MENU");
            // Create our handler game object
            root = new GameObject("PluginLoader_MainMenu_Handler");
            GameObject.DontDestroyOnLoad(root);
            var Handler = root.AddComponent <LevelLoaded_Handler_Script>();
        }