private static void Postfix(BookShopSystem __instance) { if (!Main.on) { return; } Refers component = __instance.GetComponent <Refers>(); Utils.ButtonConfirm(component.CGet <Button>("ShopOkButton")); }
private static void Postfix(BookShopSystem __instance) { if (!Main.enabled && Main.binding_key) { return; } EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose; newobj.setparam(typeof(BookShopSystem), "CloseShopWindow", () => { return(BookShopSystem.instance.shopWindow.activeInHierarchy); }); }
private static void Postfix(BookShopSystem __instance) { if (!Main.enabled || Main.binding_key) { return; } var comp = __instance.shopWindow.AddComponent <ConfirmComponent>(); comp.SetActionOnConfirm(() => { if (!BookShopSystem.instance.shopWindow.activeInHierarchy) { return; } if (!BookShopSystem.instance.shopOkButton.interactable) { return; } DateFile.instance.PlayeSE(2); BookShopSystem.instance.ShopOK(); }); }