| | |
| | | [SerializeField] |
| | | private Text needLvText; |
| | | |
| | | |
| | | [SerializeField] |
| | | Text realmTitleText; |
| | | [SerializeField] Image realmImg; |
| | | |
| | | [SerializeField] |
| | | private Text _itemTypeText; |
| | | |
| | |
| | | |
| | | [SerializeField] |
| | | protected RectTransform _itemInfoTips; |
| | | |
| | | [SerializeField] |
| | | protected RectTransform _getWaysPosTips; |
| | | |
| | | [SerializeField] |
| | | protected CanvasGroup _getWaysTips; |
| | |
| | | IEnumerator SetPanelScale() |
| | | { |
| | | yield return null; |
| | | if(!modelShow.gameObject.activeInHierarchy) |
| | | { |
| | | startPosX = -476; |
| | | endPosX = -668; |
| | | _getWaysPosTips.anchoredPosition3D = new Vector3(670,0,0); |
| | | } |
| | | else |
| | | { |
| | | startPosX = -270; |
| | | endPosX = -476; |
| | | _getWaysPosTips.anchoredPosition3D = new Vector3(860,0,0); |
| | | } |
| | | _itemInfoTips.anchoredPosition3D = new Vector3(startPosX, 0, 0); |
| | | _itemPathModel.SetInfoTipsPos(_itemInfoTips.GetComponent<RectTransform>(), _getWaysTips.GetComponent<RectTransform>()); |
| | | _itemPathModel.SetInfoTipsPos(_itemInfoTips,_getWaysPosTips); |
| | | tipAlpha.alpha = 1; |
| | | } |
| | | |
| | |
| | | _nameText.text = itemPathModel.chinItemModel.ItemName; |
| | | _nameText.color = UIHelper.GetUIColor(itemPathModel.chinItemModel.ItemColor); |
| | | _itemTypeText.text = itemPathModel.chinItemModel.ItemTypeName.ToString(); |
| | | _conditionText.text = Language.Get("KnapS110"); |
| | | needLvText.text = itemPathModel.chinItemModel.UseLV.ToString(); |
| | | CheckUselimit(); |
| | | } |
| | | |
| | | if (itemPathModel.chinItemModel.UseLV > 1) |
| | | private void CheckUselimit() |
| | | { |
| | | int[] uselimits = itemPathModel.chinItemModel.UseCondiType; |
| | | if (uselimits == null) return; |
| | | |
| | | _conditionText.gameObject.SetActive(false); |
| | | needLvText.gameObject.SetActive(false); |
| | | realmTitleText.gameObject.SetActive(false); |
| | | realmImg.gameObject.SetActive(false); |
| | | |
| | | for (int i = 0; i < uselimits.Length; i++) |
| | | { |
| | | _conditionText.gameObject.SetActive(true); |
| | | needLvText.gameObject.SetActive(true); |
| | | } |
| | | else |
| | | { |
| | | _conditionText.gameObject.SetActive(false); |
| | | needLvText.gameObject.SetActive(false); |
| | | switch (uselimits[i]) |
| | | { |
| | | case 0: |
| | | if (itemPathModel.chinItemModel.UseLV > 1) |
| | | { |
| | | _conditionText.gameObject.SetActive(true); |
| | | needLvText.gameObject.SetActive(true); |
| | | } |
| | | _conditionText.text = Language.Get("KnapS110"); |
| | | needLvText.text = itemPathModel.chinItemModel.UseLV.ToString(); |
| | | |
| | | if (PlayerDatas.Instance.baseData.LV >= itemPathModel.chinItemModel.UseLV) |
| | | { |
| | | _conditionText.color = conditionColor; |
| | | needLvText.color = conditionColor; |
| | | } |
| | | else |
| | | { |
| | | _conditionText.color = conditionRedColor; |
| | | needLvText.color = conditionRedColor; |
| | | } |
| | | |
| | | break; |
| | | case 1: |
| | | realmTitleText.gameObject.SetActive(true); |
| | | realmImg.gameObject.SetActive(true); |
| | | realmTitleText.text = Language.Get("RealmLimit1"); |
| | | RealmConfig realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(itemPathModel.chinItemModel.RealmLimit); |
| | | if (itemPathModel.chinItemModel.RealmLimit <= 0) |
| | | { |
| | | realmImg.SetSprite("NoRealm"); |
| | | } |
| | | else |
| | | { |
| | | if (realmConfig != null) |
| | | { |
| | | realmImg.SetSprite(realmConfig.Img); |
| | | } |
| | | } |
| | | |
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemPathModel.chinItemModel.RealmLimit) |
| | | { |
| | | realmTitleText.color = conditionColor; |
| | | } |
| | | else |
| | | { |
| | | realmTitleText.color = conditionRedColor; |
| | | } |
| | | break; |
| | | case 2: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (PlayerDatas.Instance.baseData.LV >= itemPathModel.chinItemModel.UseLV) |
| | | { |
| | | _conditionText.color = conditionColor; |
| | | needLvText.color = conditionColor; |
| | | } |
| | | else |
| | | { |
| | | _conditionText.color = conditionRedColor; |
| | | needLvText.color = conditionRedColor; |
| | | } |
| | | } |
| | | |
| | | private void SetMidUI() |