Example #1
0
        /// <summary>
        /// Create GameObject and remove remaining junk
        /// </summary>
        public override void OnEnable()
        {
            base.OnEnable();
            directory = new DirectoryInfo(string.Concat(
                                              Custom.RootFolderDirectory(),
                                              "ModConfigs",
                                              Path.DirectorySeparatorChar
                                              ));
            if (!directory.Exists)
            {
                directory.Create();
                directory.Refresh();
            }

            OptionsMenuPatch.SubPatch();
            On.ProcessManager.ctor += OptionScript.ProcessManagerCtor;
            // ProgressData.SubPatch(); moved to post-initialization of OIs, makes no sense to hook before the OIs are even instantiated.

            go     = new GameObject("OptionController");
            script = go.AddComponent <OptionScript>();
            //OptionScript.mod = this;

            /*
             * if (File.Exists(string.Concat(levelpath, "SoundTest.txt"))){
             *  RemoveMusicRoom();
             * }*/
        }
Example #2
0
 public override void ShutDownProcess()
 {
     //foreach (UIelement element in menuTab.items)
     //{
     //foreach (MenuObject obj in element.subObjects)
     //{
     //this.pages[0].subObjects.Remove(obj);
     //}
     //this.pages[0].Container.RemoveChild(element.myContainer);
     //element.myContainer.RemoveFromContainer();
     //}
     KillTabElements();
     OptionScript.KillTabs();
     base.ShutDownProcess();
     this.darkSprite.RemoveFromContainer();
     currentTab = null;
     FTexture.GarbageCollect(false); // Already going to be called by vanilla
 }