private static void Postfix(HomeSystem __instance)
        {
            if (!Main.enabled && Main.binding_key)
            {
                return;
            }
            EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(HomeSystem), "CloseHomeSystem", () =>
            {
                //依次检测子窗口,顺序很重要

                // 如果制造窗口开着,就不处理
                if (MakeSystem.instance.makeWindowBack.gameObject.activeInHierarchy == true)
                {
                    return(false);
                }
                // 如果商店窗口开着,就不处理
                if (ShopSystem.instance.shopWindow.activeInHierarchy == true ||
                    BookShopSystem.instance.shopWindow.activeInHierarchy == true ||
                    SystemSetting.instance.SystemSettingWindow.activeInHierarchy == true)
                {
                    return(false);
                }

                // setstudyWindow
                if (HomeSystem.instance.setStudyWindow.gameObject.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseSetStudyWindow();
                    return(false);
                }

                // studywindow
                if (HomeSystem.instance.studyWindow.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseStudyWindow();
                    return(false);
                }


                //bookWindow
                if (HomeSystem.instance.bookWindow.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseBookWindow();
                    return(false);
                }
                //building window
                if (HomeSystem.instance.buildingWindow.gameObject.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseBuildingWindow();
                    return(false);
                }

                return(HomeSystem.instance.homeSystem.activeInHierarchy);
            });
        }
        private static void Postfix(MakeSystem __instance)
        {
            if (!Main.enabled && Main.binding_key)
            {
                return;
            }
            EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(MakeSystem), "CloseMakeWindow", () =>
            {
                return(MakeSystem.instance.makeWindowBack.gameObject.activeInHierarchy);
            });
        }
        private static void Postfix(SystemSetting __instance)
        {
            if (!Main.enabled && Main.binding_key)
            {
                return;
            }
            EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(SystemSetting), "CloseSettingWindow", () =>
            {
                return(SystemSetting.instance.SystemSettingWindow.activeInHierarchy);
            });
        }
        private static void Postfix(WorldMapSystem __instance)
        {
            if (!Main.enabled && Main.binding_key)
            {
                return;
            }
            EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(ActorMenu), "CloseActorMenu", () =>
            {
                return(ActorMenu.instance.actorMenu.activeInHierarchy);
            });
        }
        private static void Postfix(WorldMapSystem __instance)
        {
            if (!Main.enabled && Main.binding_key)
            {
                return;
            }
            EscClose newobj = __instance.partWorldMapWindow.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(WorldMapSystem), "ColsePartWorldMapWindow", () =>
            {
                // 如果 剧情/奇遇 窗口开着,就不处理
                if (StorySystem.instance.toStoryIsShow == true ||
                    StorySystem.instance.storySystem.activeInHierarchy == true)
                {
                    return(false);
                }

                // 如果制造窗口开着,就不处理
                if (MakeSystem.instance.makeWindowBack.gameObject.activeInHierarchy == true)
                {
                    return(false);
                }
                // 如果商店窗口开着,就不处理
                if (ShopSystem.instance.shopWindow.activeInHierarchy == true ||
                    BookShopSystem.instance.shopWindow.activeInHierarchy == true ||
                    SystemSetting.instance.SystemSettingWindow.activeInHierarchy == true)
                {
                    return(false);
                }

                //关闭工作窗口
                //if(WorldMapSystem.instance.choo)

                return(WorldMapSystem.instance.partWorldMapWindow.activeInHierarchy);
            });
        }
示例#6
0
        private static void Postfix(HomeSystem __instance)
        {
            EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(HomeSystem), "CloseHomeSystem");
        }
示例#7
0
        private static void Postfix(WorldMapSystem __instance)
        {
            EscClose newobj = __instance.partWorldMapWindow.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(WorldMapSystem), "ColsePartWorldMapWindow");
        }
示例#8
0
        private static void Postfix(WorldMapSystem __instance)
        {
            EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(ActorMenu), "CloseActorMenu");
        }
示例#9
0
        private static void Postfix(HomeSystem __instance)
        {
            if (!Main.enabled || Main.binding_key || !Main.settings.enable_close)
            {
                return;
            }
            EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose;

            newobj.setparam(typeof(HomeSystem), "CloseHomeSystem", () =>
            {
                //依次检测子窗口,顺序很重要

                // 如果制造窗口开着,就不处理
                if (MakeSystem.instance.makeWindowBack.gameObject.activeInHierarchy == true)
                {
                    return(false);
                }
                // 如果商店窗口开着,就不处理
                if (ShopSystem.instance.shopWindow.activeInHierarchy == true ||
                    BookShopSystem.instance.shopWindow.activeInHierarchy == true ||
                    SystemSetting.instance.SystemSettingWindow.activeInHierarchy == true)
                {
                    return(false);
                }


                //Warehouse window
                if (Warehouse.instance.warehouseWindow.gameObject.activeInHierarchy == true)
                {
                    Warehouse.instance.CloseWarehouse();
                    return(false);
                }

                //bookWindow
                if (HomeSystem.instance.bookWindow.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseBookWindow();
                    return(false);
                }


                // setstudyWindow
                if (HomeSystem.instance.setStudyWindow.gameObject.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseSetStudyWindow();
                    return(false);
                }

                // studywindow
                if (HomeSystem.instance.studyWindow.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseStudyWindow();
                    return(false);
                }

                //working actor
                if (HomeSystem.instance.actorListWindow.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseActorWindow();
                    return(false);
                }
                //ququbox
                if (QuquBox.instance.ququBoxWindow.activeInHierarchy == true)
                {
                    QuquBox.instance.CloseQuquBox();
                    return(false);
                }
                //building window
                if (HomeSystem.instance.buildingWindow.gameObject.activeInHierarchy == true)
                {
                    HomeSystem.instance.CloseBuildingWindow();
                    return(false);
                }

                return(HomeSystem.instance.homeSystem.activeInHierarchy);
            });
        }