public void ShowName() { Eternity.FlatBuffer.Map mapData = m_CfgEternityProxy.GetCurrentMapData(); ulong area = Map.MapManager.GetInstance().GetCurrentAreaUid(); m_MapName.text = TableUtil.GetLanguageString($"gamingmap_name_{mapData.GamingmapId}"); m_AreaName.text = "-- " + TableUtil.GetLanguageString($"area_name_{mapData.GamingmapId}_{area}"); }
/// <summary> /// 重建所有跳点 /// </summary> private void ResetJumpPoints() { CfgEternityProxy eternityProxy = Facade.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; GameLocalizationProxy localizationProxy = Facade.RetrieveProxy(ProxyName.GameLocalizationProxy) as GameLocalizationProxy; m_LeapCfgs.Clear(); int index = 0; Eternity.FlatBuffer.Map map = eternityProxy.GetCurrentMapData(); for (int i = 0; i < map.AreaListLength; i++) { Eternity.FlatBuffer.Area area = map.AreaList(i).Value; for (int j = 0; j < area.LeapListLength; j++) { LeapItem leapVO = area.LeapList(j).Value; m_LeapCfgs.Add(leapVO); if (index >= m_PointBox.childCount) { Object.Instantiate(m_PointTemplate, m_PointBox); } if (index >= m_ArrowBox.childCount) { Object.Instantiate(m_ArrowTemplate, m_ArrowBox); } Transform leapPointItem = m_PointBox.GetChild(index); Image icon = leapPointItem.Find("Icon/Image_Icon").GetComponent <Image>(); TMP_Text nameField1 = leapPointItem.Find("JumpTips/TextBox/Name").GetComponent <TMP_Text>(); TMP_Text distanceField = leapPointItem.Find("JumpTips/TextBox/Distance").GetComponent <TMP_Text>(); Transform leapPointArrow = m_ArrowBox.GetChild(index); Image arrowIcon = FindComponent <Image>(leapPointArrow, "Icon"); if (leapVO.IconConfId == 0) { UIUtil.SetIconImage(icon, 31320); arrowIcon.gameObject.SetActive(false); } else { UIUtil.SetIconImage(icon, leapVO.IconConfId); arrowIcon.gameObject.SetActive(true); UIUtil.SetIconImage(arrowIcon, leapVO.IconConfId); } nameField1.text = localizationProxy.GetString("leap_name_" + eternityProxy.GetCurrentGamingMapId() + "_" + leapVO.LeapId); distanceField.text = ""; //Debug.LogError("LeapType : "+leapVO.LeapType+", LeapID : " + leapVO.LeapId + " , MainLeapId : " + leapVO.MainLeapId + ", Name : " + nameField1.text + ", VisibleLeapList[" + string.Join(",", leapVO.GetVisibleLeapListArray()) + "]"); index++; } } for (int i = m_PointBox.childCount - 1; i >= index; i--) { m_PointBox.GetChild(i).gameObject.SetActive(false); } for (int i = m_ArrowBox.childCount - 1; i >= index; i--) { m_ArrowBox.GetChild(i).gameObject.SetActive(false); } }