コード例 #1
0
        /// <summary>
        /// 3.
        /// </summary>
        public void OnEnable()
        {
            MyLog.LogMessage("OnEnable", string.Format("{0:0.000} ", stopwatch.Elapsed.ToString()));

            SceneManager.sceneLoaded += this.OnSceneLoaded;

            GUIHarmony.SetHarmonyPatchAll();
        }
コード例 #2
0
        public void OnDisable()
        {
            MyLog.LogMessage("OnDisable");

            //GUIVirtualMgr.SetGuiOffAll();

            SceneManager.sceneLoaded -= this.OnSceneLoaded;

            GUIHarmony.SetHarmonyUnPatchAll();
        }
コード例 #3
0
 public static void RemoveEventEndFlag(bool logon = false)
 {
     /*
      * if (Lilly.scene.name != "SceneMaidManagement")
      * {
      *  MyLog.LogDarkBlue("메이드 관리에서 사용하세요"); ;
      *  return;
      * }
      */
     if (GUIHarmony.GetHarmonyPatchCheck(typeof(MaidManagementMainPatch)))
     {
         RemoveEventEndFlag(MaidManagementMainPatch.selectMaid);
     }
     else
     {
         MyLog.LogDarkBlue("HarmonyUtill에서 MaidManagementMainPatch 를 켜주시고 메이드를 선택하세요");
     }
     //RemoveEventEndFlag(SceneEdit.Instance.maid);
 }
コード例 #4
0
        public Lilly()
        {
            Instance  = this;
            name      = "COM3D2.Lilly.Plugin";
            MyLog.log = BepInEx.Logging.Logger.CreateLogSource("Lilly");

            MyLog.LogDarkBlue("https://github.com/customordermaid3d2/COM3D2.Lilly.BepInExPlugin");

            stopwatch.Start(); // 시간측정 시작
            MyLog.LogMessage("Lilly", string.Format("{0:0.000} ", stopwatch.Elapsed.ToString()));
            MyLog.LogMessage("Lilly", DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss"));

            customFile  = Config;
            ShowCounter = Config.Bind("KeyboardShortcut", "KeyboardShortcut0", new BepInEx.Configuration.KeyboardShortcut(KeyCode.Alpha0, KeyCode.LeftControl));
            ConfigEntryUtill.init(Config);


            //GearMenu.SetButton();
            GUIHarmony.init();
            GUIMgr.GUIMgr.init();
#if PresetUtill
            PresetUtill.init();
#endif

            MyLog.LogMessage("ConfigFilePath", customFile.ConfigFilePath);

            // 성능이 너무 나쁨. 하모니가 괜히 클래스 지정한게 아닌듯
            //InvokeInit.Invoke();
            //InvokeAwake.Invoke();
            if (actionsInit.GetLength() > 0)
            {
                actionsInit();
            }

            configEntryUtill = ConfigEntryUtill.Create(
                "Lilly"
                , "OnSceneLoaded"
                , "GameObjectMgr" //configEntryUtill["GameObjectMgr"]
                );
        }