public void refreshA3EquipIcon_byType(GameObject root, a3_BagItemData data, EQUIP_SHOW_TYPE show_type = EQUIP_SHOW_TYPE.SHOW_COMMON) { Text component = root.transform.FindChild("inlvl").GetComponent <Text>(); component.color = new Color(1f, 0.7f, 0f); Text component2 = root.transform.FindChild("num").GetComponent <Text>(); component2.gameObject.SetActive(false); Transform transform = root.transform.FindChild("stars"); switch (data.equipdata.stage) { } for (int i = 0; i < transform.childCount; i++) { transform.GetChild(i).gameObject.SetActive(false); } for (int j = 0; j < data.equipdata.stage; j++) { transform.GetChild(j).gameObject.SetActive(true); } switch (show_type) { case EQUIP_SHOW_TYPE.SHOW_INTENSIFY: transform.gameObject.SetActive(false); component.gameObject.SetActive(true); component.text = "+" + data.equipdata.intensify_lv; break; case EQUIP_SHOW_TYPE.SHOW_ADDLV: transform.gameObject.SetActive(false); component.gameObject.SetActive(true); component.text = "追" + data.equipdata.add_level; break; case EQUIP_SHOW_TYPE.SHOW_STAGE: component.gameObject.SetActive(false); transform.gameObject.SetActive(true); break; case EQUIP_SHOW_TYPE.SHOW_INTENSIFYANDSTAGE: transform.gameObject.SetActive(true); component.gameObject.SetActive(true); component.text = "+" + data.equipdata.intensify_lv; break; default: transform.gameObject.SetActive(false); component.gameObject.SetActive(false); break; } }
public void refreshA3EquipIcon_byType(GameObject root, a3_BagItemData data, EQUIP_SHOW_TYPE show_type = EQUIP_SHOW_TYPE.SHOW_COMMON) { Text numText = root.transform.FindChild("inlvl").GetComponent <Text>(); numText.color = new Color(1, 0.7f, 0); Text tt = root.transform.FindChild("num").GetComponent <Text>(); tt.gameObject.SetActive(false); //Text lvl = root.transform.FindChild("lvl").GetComponent<Text>(); //lvl.color = new Color(1, 0.7f, 0); Transform stars = root.transform.FindChild("stars"); //if (data.confdata.equip_type != 8 && data.confdata.equip_type != 9 && data.confdata.equip_type != 10) // numText.transform.localPosition = new Vector3(-4,-68,0); string str = ""; switch (data.equipdata.stage) { case 0: break; case 1: str = ContMgr.getCont("IconImageMgr0"); break; case 2: str = ContMgr.getCont("IconImageMgr1"); break; case 3: str = ContMgr.getCont("IconImageMgr2"); break; case 4: str = ContMgr.getCont("IconImageMgr3"); break; case 5: str = ContMgr.getCont("IconImageMgr4"); break; case 6: str = ContMgr.getCont("IconImageMgr5"); break; case 7: str = ContMgr.getCont("IconImageMgr6"); break; case 8: str = ContMgr.getCont("IconImageMgr7"); break; case 9: str = ContMgr.getCont("IconImageMgr8"); break; case 10: str = ContMgr.getCont("IconImageMgr9"); break; } for (int i = 0; i < stars.childCount; i++) { stars.GetChild(i).gameObject.SetActive(false); } for (int i = 0; i < data.equipdata.stage; i++) { stars.GetChild(i).gameObject.SetActive(true); } switch (show_type) { case EQUIP_SHOW_TYPE.SHOW_INTENSIFY: //显示强化 stars.gameObject.SetActive(false); numText.gameObject.SetActive(true); numText.text = "+" + data.equipdata.intensify_lv; break; case EQUIP_SHOW_TYPE.SHOW_ADDLV: //显示追加 stars.gameObject.SetActive(false); numText.gameObject.SetActive(true); numText.text = ContMgr.getCont("a3_auction_zhui") + data.equipdata.add_level; break; case EQUIP_SHOW_TYPE.SHOW_STAGE: //显示进阶 numText.gameObject.SetActive(false); stars.gameObject.SetActive(true); // lvl.text = str; break; case EQUIP_SHOW_TYPE.SHOW_INTENSIFYANDSTAGE: //显示强化和显示进阶 stars.gameObject.SetActive(true); // lvl.text = str; numText.gameObject.SetActive(true); numText.text = "+" + data.equipdata.intensify_lv; break; default: stars.gameObject.SetActive(false); numText.gameObject.SetActive(false); break; } }