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

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

                // 如果开始奇遇没有显示,则不处理
                if (StorySystem.instance.toStoryIsShow != true)
                {
                    return(false);
                }
                // 如果按钮不可以交互,不处理
                if (StorySystem.instance.openStoryButton.interactable != true)
                {
                    return(false);
                }

                return(StorySystem.instance.openStoryButton.interactable);
            });
        }
예제 #2
0
        private static void Postfix(UIDate __instance)
        {
            if (!Main.enabled || Main.binding_key)
            {
                return;
            }
            ConfirmConfirm newobj = __instance.gameObject.AddComponent(typeof(ConfirmConfirm)) as ConfirmConfirm;

            newobj.setparam(typeof(HomeSystem), "StartNewBuilding", () =>
            {
                //依次检测子窗口,顺序很重要
                if (HomeSystem.instance.homeSystem.activeInHierarchy == false)
                {
                    return(false);
                }

                if (HomeSystem.instance.buildingUPWindowBack.activeInHierarchy == true && HomeSystem.instance.buildingUpCanBuildingButton.interactable)
                {
                    HomeSystem.instance.StartBuildingUp();
                    return(false);
                }
                if (HomeSystem.instance.buildingRemoveCanBuildingButton.gameObject.transform.parent.gameObject.activeInHierarchy == true &&
                    HomeSystem.instance.buildingRemoveCanBuildingButton.interactable)
                {
                    HomeSystem.instance.StartBuildingRemove();
                    return(false);
                }
                if (HomeSystem.instance.buildingWindow.Find("NewBuildingWindowBack").gameObject.activeInHierarchy == true)
                {
                    return(HomeSystem.instance.canBuildingButton.interactable);
                }
                return(false);
            });
        }
예제 #3
0
        private static void Postfix(UIDate __instance)
        {
            if (!Main.enabled || Main.binding_key)
            {
                return;
            }
            ConfirmConfirm newobj = __instance.gameObject.AddComponent(typeof(ConfirmConfirm)) as ConfirmConfirm;

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

                // 如果开始奇遇没有显示,则不处理
                if (BookShopSystem.instance.shopWindow.activeInHierarchy != true)
                {
                    return(false);
                }

                return(BookShopSystem.instance.shopOkButton.interactable);
            });
        }
예제 #4
0
        private static void Postfix(UIDate __instance)
        {
            if (!Main.enabled || Main.binding_key || !Main.settings.enable_close)
            {
                return;
            }
            ConfirmConfirm newobj = __instance.gameObject.AddComponent(typeof(ConfirmConfirm)) as ConfirmConfirm;

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

                // 如果开始奇遇没有显示,则不处理
                if (UIDate.instance.trunChangeWindow.activeInHierarchy != true)
                {
                    return(false);
                }

                return(UIDate.instance.trunChangeWindow.activeInHierarchy);
            });
        }