static void Postfix(WorldMapSystem __instance, ref Text ___itemMoneyText, ref Text ___itemLevelText, ref Text ___informationMassage, ref Text ___informationName, ref bool ___anTips) { if (!Main.enabled && !settings.skillbattleTips) { return; } if (!Main.PowerChange) { return; } if (___anTips) { if (___informationName.text == "解答") { //logger.Log(string.Format("name = {0} text={1}", ___informationName.text, ___informationMassage.text)); ___informationMassage.text = string.Format("{0}\n\n{1}", DateFile.instance.massageDate[906][1], DateFile.instance.SetColoer(20004, Main.AnswerTips)); } else if (___informationName.text == "反问") { ___informationMassage.text = string.Format("{0}\n\n{1}", DateFile.instance.massageDate[905][1], DateFile.instance.SetColoer(20004, Main.ReAskTips)); } else if (___informationName.text == "提问") { ___informationMassage.text = string.Format("{0}\n\n{1}", DateFile.instance.massageDate[903][1], DateFile.instance.SetColoer(20004, Main.AskTips)); } //Main.PowerChange = false; } }
private static void Postfix(WorldMapSystem __instance) { if (!Main.enabled || Main.binding_key) { return; } if (UIManager.Instance.curState == UIState.MainWorld) { if (Main.GetKeyDown(HK_TYPE.VILLAGE_LOCAL)) { Utils.ShowLocalHomeSystem(); } else if (Main.GetKeyDown(HK_TYPE.VILLAGE)) { Utils.ShowHomeSystem(); } } else if (UIManager.Instance.curState == UIState.HomeSystem) { if (Main.GetKeyDown(HK_TYPE.VILLAGE_LOCAL) || Main.GetKeyDown(HK_TYPE.VILLAGE)) { Utils.CloseHomeSystemWindow(); } } }
private static void Postfix(WorldMapSystem __instance) { var wtw = __instance.workTypWindow; bool flag = (((DateFile.instance.mianWorldId == __instance.chooseWorldId) && (DateFile.instance.mianPartId == __instance.choosePartId)) && ((DateFile.instance.mianPlaceId == __instance.choosePlaceId) && (int.Parse(DateFile.instance.GetNewMapDate(__instance.choosePartId, __instance.choosePlaceId, 12)) > 0))) && !DateFile.instance.PlaceIsBad(__instance.choosePartId, __instance.choosePlaceId); wtw.transform.GetChild(1).gameObject.SetActive(flag); return; }
public static void Postfix(WorldMapSystem __instance) { if (Main.settings.Mengluu) { Walk Walk = new Walk(); Walk.WalkStar(); } }
static void Postfix(WorldMapSystem __instance, int partId, int placeId) { if (!Main.enabled || !Main.settings.tombNumberLimited) { return; } Main.inUpdatePlaceActor = false; }
public void Start() { Main.logger.Log("start"); open = false; //collapse = false; windowRect = new Rect(Screen.width * 0.833f, 50f, Screen.width * 0.164f, 0); scrollPosition = Vector2.zero; windowStyle = new GUIStyle { name = "window", padding = new RectOffset(5, 5, 5, 5), }; collapseStyle = new GUIStyle { name = "collapse", fontSize = 24, alignment = TextAnchor.MiddleCenter, margin = new RectOffset(5, 5, 5, 5), }; collapseStyle.normal.textColor = Color.blue; labelStyle = new GUIStyle { name = "label", fontSize = 12, alignment = TextAnchor.MiddleLeft, margin = new RectOffset(0, 0, 5, 0), }; labelStyle.normal.textColor = Color.yellow; buttonStyle = new GUIStyle { name = "button", fontSize = 12, alignment = TextAnchor.MiddleLeft, fixedWidth = windowRect.width - 40, margin = new RectOffset(0, 0, 5, 0), }; buttonStyle.normal.textColor = Color.white; buttonStyle.richText = true; seperatorStyle = new GUIStyle { name = "seperator", fontSize = 12, alignment = TextAnchor.MiddleCenter, fixedWidth = windowRect.width - 40, }; seperatorStyle.normal.textColor = Color.cyan; df = DateFile.instance; wms = WorldMapSystem.instance; }
public static void Prefix(WorldMapSystem __instance) { if (Main.settings.Mengluu) { if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.W)) { Main.Place.Clear(); } } }
public void Init() { df = DateFile.instance; wms = WorldMapSystem.instance; // 设置点击事件 var btn = GameObject.Find("ManpowerIcon,7").AddComponent <Button>(); btn.targetGraphic = UIDate.instance.manpowerText; btn.interactable = true; btn.onClick.AddListener(ToggleWindow); }
static void Postfix(WorldMapSystem __instance) { if (!Main.enabled || !Main.settings.crossMonth) { return; } if (TrunChange.trunChanging == true) { TrunChange.trunChanging = false; } }
public void Start() { Main.logger.Log("start"); Open = false; //collapse = false; scrollPosition = Vector2.zero; windowStyle = new GUIStyle { name = "window", padding = new RectOffset(5, 5, 5, 5), }; collapseStyle = new GUIStyle { name = "collapse", fontSize = 14, alignment = TextAnchor.MiddleCenter, margin = new RectOffset(5, 5, 5, 5), }; collapseStyle.normal.textColor = Color.red; labelStyle = new GUIStyle { name = "label", alignment = TextAnchor.MiddleCenter, margin = new RectOffset(0, 0, 5, 5), }; labelStyle.normal.textColor = Color.yellow; buttonStyle = new GUIStyle { name = "button", alignment = TextAnchor.MiddleLeft, margin = new RectOffset(0, 0, 5, 0), }; buttonStyle.normal.textColor = Color.white; buttonStyle.richText = true; seperatorStyle = new GUIStyle { name = "seperator", alignment = TextAnchor.MiddleCenter, }; seperatorStyle.normal.textColor = Color.cyan; df = DateFile.instance; wms = WorldMapSystem.instance; CalcWindow(); }
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); }); }
public static void Prefix(WorldMapSystem __instance, bool __state, int partId, int placeId, ref bool fastMove) { if (!Main.enabled) { return; } __state = fastMove; int num = int.Parse(DateFile.instance.GetNewMapDate(partId, placeId, 999)); if (num == 20002) { fastMove = true; } }
private static void Postfix(WorldMapSystem __instance) { if (!Main.on) { return; } __instance.gameObject .AddComponent <ActionsComponent>() .OnCheck(HK_TYPE.MAP_MOVE) .OnCheck(_ => DateFile.instance.mianWorldId == worldId) .OnCheck(_ => DateFile.instance.mianPartId == partId) .OnCheck(_ => __instance.worldMapPlaces[placeId] != null) .OnCheck(_ => __instance.worldMapPlaces[placeId].gameObject.activeInHierarchy) .AddAction(() => __instance.ShowChoosePlaceMenu(worldId, partId, placeId, placeImage)); }
static void Postfix(WorldMapSystem __instance, ref GameObject tips, ref bool on, ref Text ___itemMoneyText, ref Text ___informationMassage, ref Text ___informationName, ref bool ___anTips) { if (!Main.enabled) { return; } if (tips != null && ___anTips == false && on) { string[] array = tips.name.Split(new char[] { ',' }); if (array[0] == "Actor") { int typ = int.Parse(typeof(WorldMapSystem).GetField("showPlaceActorTyp", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(WorldMapSystem.instance).ToString()); if (typ == 1 && WorldMapSystem.instance.choosePlaceId == DateFile.instance.mianPlaceId) { int id = int.Parse(array[1]); ___informationMassage.text = ""; ___informationName.text = DateFile.instance.GetActorName(id, true, false) + "(" + GetFame(id) + ")\n"; ___itemMoneyText.text = GetChame(id, Main.settings.addonInfo); Text text = ___informationMassage; text.text += "\t立场:" + GetGoodness(id); text.text += "\t\t\t喜好:" + Gethobby(id, 0); text.text += "\t\t\t厌恶:" + Gethobby(id, 1) + "\n\n"; string text1 = Main.settings.addonInfo ? "\t\t\t\t" : "\t"; for (int i = 0; i < 16; i++) { if (i < 14) { text.text += string.Format("{0}\t\t\t{1}\n", GetLevel(id, i, 0, Main.settings.addonInfo), GetLevel(id, i, 1, Main.settings.addonInfo)); } else { text.text += string.Format("{0}\n", GetLevel(id, i, 0, Main.settings.addonInfo)); } } ___anTips = true; } } } }
//激活工作按钮 private static void Postfix(WorldMapSystem __instance) { if (!Main.enabled) { return; } //Main.Logger.Log(" __state get state: " + __state); if (DateFile.instance.mianWorldId != __instance.chooseWorldId) { return; } if (DateFile.instance.mianPartId != __instance.choosePartId) { return; } if (int.Parse(DateFile.instance.GetNewMapDate(__instance.choosePartId, __instance.choosePlaceId, 12)) <= 0) { return; } if (DateFile.instance.PlaceIsBad(__instance.choosePartId, __instance.choosePlaceId)) { return; } for (int i = 0; i < __instance.workTimeNeed.Length; i += 1) { if (__instance.workTimeNeed[i].activeSelf) { return; } } for (int i = 0; i < __instance.allworkButton.Length; i++) { __instance.allworkButton[i].interactable = true; } return; }
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); }); }
private static bool Prefix(WorldMapSystem __instance, bool ___moveButtonDown, bool ___isShowPartWorldMap) { if (!Main.enabled && Main.binding_key) { return(true); } if (DateFile.instance.battleStart == false && //无战斗 UIDate.instance.trunChangeImage[0].gameObject.activeSelf == false && //非回合结算 SystemSetting.instance.SystemSettingWindow.activeInHierarchy == false) // 系统设置未开启 { //处理关闭 if (YesOrNoWindow.instance.yesOrNoIsShow == true && YesOrNoWindow.instance.isActiveAndEnabled == true) { if ((Main.GetKeyDown(HK_TYPE.HK_CLOSE) == true || (Main.settings.close_with_right_mouse_button == true && Input.GetMouseButtonDown(1) == true)) && YesOrNoWindow.instance.no.isActiveAndEnabled == true) { YesOrNoWindow.instance.CloseYesOrNoWindow(); return(false); } if (Main.GetKeyDown(HK_TYPE.HK_COMFIRM) == true || Main.GetKeyDown(HK_TYPE.HK_CONFIRM2) == true) { OnClick.instance.Index(); YesOrNoWindow.instance.CloseYesOrNoWindow(); return(false); } } //界面快捷键 人物/世界地图/村子地图 if (YesOrNoWindow.instance.MaskShow() == false) //无模态对话框 { if (Main.GetKeyDown(HK_TYPE.HK_ACTORMENU) && __instance.partWorldMapWindow.activeInHierarchy == false) { if (ActorMenu.instance.actorMenu.activeInHierarchy == false) { ActorMenu.instance.ShowActorMenu(false); return(false); } else { ActorMenu.instance.CloseActorMenu(); return(false); } } if (Main.GetKeyDown(HK_TYPE.HK_VILLAGE) && __instance.partWorldMapWindow.activeInHierarchy == false) { if (HomeSystem.instance.homeSystem.activeInHierarchy == false) { HomeSystem.instance.ShowHomeSystem(true); } else { HomeSystem.instance.CloseHomeSystem(); return(false); } } if (Main.GetKeyDown(HK_TYPE.HK_WORLDMAP)) { if (__instance.partWorldMapWindow.activeInHierarchy == false) { WorldMapSystem.instance.ShowPartWorldMapWindow(DateFile.instance.mianWorldId); return(false); } else { WorldMapSystem.instance.ColsePartWorldMapWindow(); return(false); } } } //治疗和采集 奇遇 if (__instance.partWorldMapWindow.activeInHierarchy == false && //世界地图未开启 ActorMenu.instance.actorMenu.activeInHierarchy == false && //人物菜单未开启 HomeSystem.instance.homeSystem.activeInHierarchy == false && //村镇地图未开启 BattleSystem.instance.battleWindow.activeInHierarchy == false) //非战斗状态 { //治疗 if (Main.GetKeyDown(HK_TYPE.HK_HEAL) && WorldMapSystem.instance.mapHealingButton[0].interactable == true) { WorldMapSystem.instance.MapHealing(0); return(false); } //治疗中毒 if (Main.GetKeyDown(HK_TYPE.HK_POISON) && WorldMapSystem.instance.mapHealingButton[1].interactable == true) { WorldMapSystem.instance.MapHealing(1); return(false); } //采集食物 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_FOOD) && __instance.timeWorkWindow.activeInHierarchy == false) { WorldMapSystem.instance.choosePartId = DateFile.instance.mianPartId; WorldMapSystem.instance.choosePlaceId = DateFile.instance.mianPlaceId; WorldMapSystem.instance.chooseWorkTyp = 0; // 0= 粮食 WorldMapSystem.instance.ChooseTimeWork(); return(false); } //采集金石 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_MINERAL) && __instance.timeWorkWindow.activeInHierarchy == false) { WorldMapSystem.instance.choosePartId = DateFile.instance.mianPartId; WorldMapSystem.instance.choosePlaceId = DateFile.instance.mianPlaceId; WorldMapSystem.instance.chooseWorkTyp = 2; // 2= 金石 WorldMapSystem.instance.ChooseTimeWork(); return(false); } //采集药草 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_HERB) && __instance.timeWorkWindow.activeInHierarchy == false) { WorldMapSystem.instance.choosePartId = DateFile.instance.mianPartId; WorldMapSystem.instance.choosePlaceId = DateFile.instance.mianPlaceId; WorldMapSystem.instance.chooseWorkTyp = 4; // 4= 草药 WorldMapSystem.instance.ChooseTimeWork(); return(false); } //采集银钱 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_MONEY) && __instance.timeWorkWindow.activeInHierarchy == false) { WorldMapSystem.instance.choosePartId = DateFile.instance.mianPartId; WorldMapSystem.instance.choosePlaceId = DateFile.instance.mianPlaceId; WorldMapSystem.instance.chooseWorkTyp = 5; // 5= 银钱 WorldMapSystem.instance.ChooseTimeWork(); return(false); } //采集织物 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_CLOTH) && __instance.timeWorkWindow.activeInHierarchy == false) { WorldMapSystem.instance.choosePartId = DateFile.instance.mianPartId; WorldMapSystem.instance.choosePlaceId = DateFile.instance.mianPlaceId; WorldMapSystem.instance.chooseWorkTyp = 3; // 3= 织物 WorldMapSystem.instance.ChooseTimeWork(); return(false); } //采集木材 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_WOOD) && __instance.timeWorkWindow.activeInHierarchy == false) { WorldMapSystem.instance.choosePartId = DateFile.instance.mianPartId; WorldMapSystem.instance.choosePlaceId = DateFile.instance.mianPlaceId; WorldMapSystem.instance.chooseWorkTyp = 1; // 1=木材 WorldMapSystem.instance.ChooseTimeWork(); return(false); } //奇遇 if (Main.GetKeyDown(HK_TYPE.HK_VISITEVENT) && DateFile.instance.HaveShow(DateFile.instance.mianPartId, DateFile.instance.mianPlaceId) > 0 && WorldMapSystem.instance.openToStoryButton.interactable == true) { WorldMapSystem.instance.OpenToStory(); } } } //原有Update代码修改 if (Main.GetKeyDown(HK_TYPE.HK_COMFIRM) || Main.GetKeyDown(HK_TYPE.HK_CONFIRM2)) { UIDate.instance.ChangeTrunButton(); return(false); } if (!___moveButtonDown) { if (Main.GetKey(HK_TYPE.HK_UP) || Main.GetKey(HK_TYPE.HK_UP2)) { ___moveButtonDown = true; GetMoveKey.Invoke(__instance, new object[] { 1 }); return(false); } else if (Main.GetKey(HK_TYPE.HK_LEFT) || Main.GetKey(HK_TYPE.HK_LEFT2)) { ___moveButtonDown = true; GetMoveKey.Invoke(__instance, new object[] { 2 }); return(false); } else if (Main.GetKey(HK_TYPE.HK_DOWN) || Main.GetKey(HK_TYPE.HK_DOWN2)) { ___moveButtonDown = true; GetMoveKey.Invoke(__instance, new object[] { 3 }); return(false); } else if (Main.GetKey(HK_TYPE.HK_RIGHT) || Main.GetKey(HK_TYPE.HK_RIGHT2)) { ___moveButtonDown = true; GetMoveKey.Invoke(__instance, new object[] { 4 }); return(false); } } return(false); }
static void Postfix(WorldMapSystem __instance, ref GameObject tips, ref bool on, ref Text ___itemMoneyText, ref Text ___itemLevelText, ref Text ___informationMassage, ref Text ___informationName, ref bool ___anTips) { if (!Main.enabled) { return; } if (tips != null && ___anTips == false && on) { bool needShow = false; int id = -1; //建筑/地图左边的列表 string[] array = tips.name.Split(new char[] { ',' }); if (array[0] == "Actor") { int typ = int.Parse(typeof(WorldMapSystem).GetField("showPlaceActorTyp", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(WorldMapSystem.instance).ToString()); if (typ == 1 && WorldMapSystem.instance.choosePlaceId == DateFile.instance.mianPlaceId) { id = int.Parse(array[1]); needShow = true; } } //对话窗口的人物头像 else if (array[0] == "FaceHolder") { id = MassageWindow.instance.eventMianActorId; needShow = true; } if (needShow) { ___informationMassage.text = ""; ___informationName.text = DateFile.instance.GetActorName(id, true, false) + "(" + GetFame(id) + (!Main.settings.showMood ? "" : "," + GetMood(id)) + ")\n"; if (Main.settings.shopName) { string shopName = GetShopName(id); if (Main.settings.healthStatus && shopName.Length > 0) { ___informationName.text += shopName + "\n"; } else { ___informationName.text += shopName; } } if (Main.settings.workPlace) { string workPlace = GetWorkPlace(id); if (Main.settings.healthStatus && workPlace.Length != 0) { ___informationName.text += workPlace + "\n"; } else { ___informationName.text += GetWorkPlace(id); } } if (Main.settings.healthStatus) { List <int> list = GetHPSP(id); List <int> list1 = GetPoison(id); if (list[0] != 0 || list[2] != 0 || GetPoison(id)[0] == 1) { if (GetPoison(id)[0] == 1) { if (list[0] != 0 || list[2] != 0) { ___informationName.text += DateFile.instance.SetColoer(20010, "受伤") + "/" + DateFile.instance.SetColoer(20007, "中毒"); } else { ___informationName.text += DateFile.instance.SetColoer(20007, "中毒"); } } else { ___informationName.text += DateFile.instance.SetColoer(20010, "受伤"); } } else { ___informationName.text += DateFile.instance.SetColoer(20004, "健康"); } } ___itemLevelText.text = string.Format("\t{0}({1})", GetAge(id), GetHealth(id)); ___itemMoneyText.text = GetChame(id, Main.settings.addonInfo); Text text = ___informationMassage; text.text += "\t立场:" + GetGoodness(id); text.text += "\t\t\t喜好:" + Gethobby(id, 0); text.text += "\t\t\t厌恶:" + Gethobby(id, 1) + "\n\n"; string text1 = Main.settings.addonInfo ? "\t\t\t\t" : "\t"; for (int i = 0; i < 16; i++) { if (i < 14) { text.text += string.Format("\t{0}\t\t\t\t{1}\n", GetLevel(id, i, 0, Main.settings.addonInfo), GetLevel(id, i, 1, Main.settings.addonInfo)); } else { text.text += string.Format("\t{0}\n", GetLevel(id, i, 0, Main.settings.addonInfo)); } } ___anTips = true; } } }
public void Start() { Main.logger.Log("start"); Open = false; //collapse = false; scrollPosition = Vector2.zero; windowStyle = new GUIStyle { name = "window", padding = new RectOffset(5, 5, 5, 5), }; collapseStyle = new GUIStyle { name = "collapse", fontSize = 12, alignment = TextAnchor.MiddleRight, fixedWidth = 25f, }; collapseStyle.normal.textColor = Color.red; labelStyle = new GUIStyle { name = "label", alignment = TextAnchor.MiddleCenter, margin = new RectOffset(0, 0, 5, 5), }; labelStyle.normal.textColor = Color.yellow; buttonStyle = new GUIStyle { name = "button", alignment = TextAnchor.MiddleLeft, margin = new RectOffset(0, 0, 5, 0), }; buttonStyle.normal.textColor = Color.white; buttonStyle.richText = true; seperatorStyle = new GUIStyle { name = "seperator", alignment = TextAnchor.MiddleCenter, }; seperatorStyle.normal.textColor = Color.cyan; df = DateFile.instance; wms = WorldMapSystem.instance; CalcWindow(); ToggleWindow(); // 设置点击事件 // var btn = UIDate.instance.manpowerText.gameObject.AddComponent<Button>(); // btn.interactable = true; // btn.targetGraphic = UIDate.instance.manpowerText; // btn.onClick.AddListener(() => // { // VillagersList.Instance.ToggleWindow(); // Main.logger.Log("toggle"); // }); }
public static void Postfix(WorldMapSystem __instance, bool __state, int partId, int placeId, ref bool fastMove) { fastMove = __state; }
private static bool Prefix(WorldMapSystem __instance, bool ___moveButtonDown, bool ___isShowPartWorldMap) { if (YesOrNoWindow.instance.yesOrNoIsShow == true && YesOrNoWindow.instance.isActiveAndEnabled == true) { if (Main.GetKeyDown(HK_TYPE.HK_CLOSE) == true && YesOrNoWindow.instance.no.isActiveAndEnabled == true) { YesOrNoWindow.instance.CloseYesOrNoWindow(); return(false); } if (Main.GetKeyDown(HK_TYPE.HK_COMFIRM) == true || Main.GetKeyDown(HK_TYPE.HK_CONFIRM2) == true) { OnClick.instance.Index(); YesOrNoWindow.instance.CloseYesOrNoWindow(); return(false); } } if (Main.GetKeyDown(HK_TYPE.HK_ACTORMENU)) { if (ActorMenu.instance.actorMenu.activeSelf == false) { ActorMenu.instance.ShowActorMenu(false); return(false); } else { ActorMenu.instance.CloseActorMenu(); return(false); } } if (Main.GetKeyDown(HK_TYPE.HK_VILLAGE)) { if (HomeSystem.instance.homeSystem.activeSelf == false) { HomeSystem.instance.ShowHomeSystem(true); } else { HomeSystem.instance.CloseHomeSystem(); return(false); } } if (Main.GetKeyDown(HK_TYPE.HK_WORLDMAP)) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.ShowPartWorldMapWindow(DateFile.instance.mianWorldId); return(false); } else { WorldMapSystem.instance.ColsePartWorldMapWindow(); return(false); } } if (Main.GetKeyDown(HK_TYPE.HK_HEAL)) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.MapHealing(0); return(false); } } if (Main.GetKeyDown(HK_TYPE.HK_POISON)) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.MapHealing(1); return(false); } } //采集食物 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_FOOD) && __instance.timeWorkWindow.active == false) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.chooseWorkTyp = 0; // 0= 粮食 WorldMapSystem.instance.ChooseTimeWork(); return(false); } } //采集金石 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_MINERAL) && __instance.timeWorkWindow.active == false) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.chooseWorkTyp = 2; // 2= 金石 WorldMapSystem.instance.ChooseTimeWork(); return(false); } } //采集药草 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_HERB) && __instance.timeWorkWindow.active == false) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.chooseWorkTyp = 4; // 4= 草药 WorldMapSystem.instance.ChooseTimeWork(); return(false); } } //采集银钱 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_MONEY) && __instance.timeWorkWindow.active == false) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.chooseWorkTyp = 5; // 5= 银钱 WorldMapSystem.instance.ChooseTimeWork(); return(false); } } //采集织物 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_CLOTH) && __instance.timeWorkWindow.active == false) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.chooseWorkTyp = 3; // 3= 织物 WorldMapSystem.instance.ChooseTimeWork(); return(false); } } //采集木材 if (Main.GetKeyDown(HK_TYPE.HK_GATHER_WOOD) && __instance.timeWorkWindow.active == false) { if (__instance.partWorldMapWindow.active == false) { WorldMapSystem.instance.chooseWorkTyp = 1; // 1=木材 WorldMapSystem.instance.ChooseTimeWork(); return(false); } } if (Main.GetKeyDown(HK_TYPE.HK_COMFIRM) || Main.GetKeyDown(HK_TYPE.HK_CONFIRM2)) { UIDate.instance.ChangeTrunButton(); return(false); } if (!___moveButtonDown) { if (Main.GetKeyDown(HK_TYPE.HK_UP) || Main.GetKeyDown(HK_TYPE.HK_UP2)) { ___moveButtonDown = true; GetMoveKey.Invoke(__instance, new object[] { 1 }); return(false); } else if (Main.GetKeyDown(HK_TYPE.HK_LEFT) || Main.GetKeyDown(HK_TYPE.HK_LEFT2)) { ___moveButtonDown = true; GetMoveKey.Invoke(__instance, new object[] { 2 }); return(false); } else if (Main.GetKeyDown(HK_TYPE.HK_DOWN) || Main.GetKeyDown(HK_TYPE.HK_DOWN2)) { ___moveButtonDown = true; GetMoveKey.Invoke(__instance, new object[] { 3 }); return(false); } else if (Main.GetKeyDown(HK_TYPE.HK_RIGHT) || Main.GetKeyDown(HK_TYPE.HK_RIGHT2)) { ___moveButtonDown = true; GetMoveKey.Invoke(__instance, new object[] { 4 }); return(false); } } return(false); }
private static void Postfix(WorldMapSystem __instance) { EscClose newobj = __instance.gameObject.AddComponent(typeof(EscClose)) as EscClose; newobj.setparam(typeof(ActorMenu), "CloseActorMenu"); }
private static void Postfix(WorldMapSystem __instance) { EscClose newobj = __instance.partWorldMapWindow.gameObject.AddComponent(typeof(EscClose)) as EscClose; newobj.setparam(typeof(WorldMapSystem), "ColsePartWorldMapWindow"); }
public void Init() { df = DateFile.instance; wms = WorldMapSystem.instance; }