/** 显示强化状态 */ private void ShowPowerState() { if (starSoul.isMaxLevel() || starSoul.getStarSoulType() == 0) // 满级以及经验类星魂不显示强化按钮 { gameObject.SetActive(false); } else { gameObject.SetActive(true); textLabel.text = LanguageConfigManager.Instance.getLanguage("s0012"); } }
public void setButtonPower() { if (starSoul.isMaxLevel() || starSoul.getStarSoulType() == 0) { buttonPower.gameObject.SetActive(false); } else { buttonPower.gameObject.SetActive(true); } }
/// <summary> /// 创建星魂条目 /// </summary> /// <param name="starSoul">星魂</param> private GameObject CreateStarSoulItem(StarSoul starSoul) { Transform trans = awardContent.transform.FindChild(starSoul.uid); if (trans != null) // 避免出现相同uid的星魂 { GameObject.Destroy(trans.gameObject); } GameObject obj = NGUITools.AddChild(awardContent, goodsViewProfab) as GameObject; obj.transform.localScale = new Vector3(0.85f, 0.85f, 1); GoodsView view = obj.transform.GetComponent <GoodsView> (); view.LockOnClick = false; view.init(starSoul, GoodsView.BOTTOM_TEXT_NAME); view.fatherWindow = tapContent.fatherwindow; view.onClickCallback = () => { StorageManagerment smanager = StorageManagerment.Instance; if (starSoul.getStarSoulType() == 0) // 经验类星魂 { bool isQuality = starSoul.getQualityId() >= QualityType.EPIC?true:false; if (isQuality) { UiManager.Instance.openDialogWindow <MessageWindow> ((win) => { win.msg.msgInfo = starSoul.uid; win.initWindow(2, LanguageConfigManager.Instance.getLanguage("s0094"), LanguageConfigManager.Instance.getLanguage("s0093"), LanguageConfigManager.Instance.getLanguage("StarSoulWindow_storeContent_changeQuality"), doOnClickCallback); }); return; } } else // 非经验类星魂 { if (smanager.isStarSoulStorageFull(1)) // 星魂仓库满 { UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => { win.Initialize(LanguageConfigManager.Instance.getLanguage("StarSoulWindow_StarSoul_Storage_Full")); }); return; } } MessageHandle msg = new MessageHandle(); msg.buttonID = MessageHandle.BUTTON_RIGHT; msg.msgInfo = starSoul.uid; doOnClickCallback(msg); }; view.longPassCallback = () => { UiManager.Instance.openDialogWindow <StarSoulAttrWindow> ( (win) => { win.Initialize(starSoul, StarSoulAttrWindow.AttrWindowType.None); }); }; return(obj); }
/** 更新button */ public void UpdateButton() { if (stateType == ButtonStateType.Lock) { storeButton.gameObject.SetActive(false); storeChoose.gameObject.SetActive(true); StarSoulManager manager = StarSoulManager.Instance; bool isExist = manager.checkLockState(starSoul.uid); if (isExist) { storeChoose.value = manager.getLockState(starSoul.uid); } else { storeChoose.value = starSoul.checkState(EquipStateType.LOCKED); } } else if (stateType == ButtonStateType.CHANGE) { if (starSoul.checkState(EquipStateType.OCCUPY) || starSoul.checkState(EquipStateType.LOCKED)) // 装备中或者锁定中转化经验不显示勾选框 { storeButton.gameObject.SetActive(false); storeChoose.gameObject.SetActive(false); storeChoose.value = false; } else { StarSoulManager manager = StarSoulManager.Instance; storeButton.gameObject.SetActive(false); storeChoose.gameObject.SetActive(true); if (isSelect) { if (starSoul.getQualityId() <= GameManager.Instance.starSoulOneKeySelectValue) { StarSoulManager.Instance.setChangeExpState(starSoul.uid, true); } } if (starSoul.getStarSoulType() == 0) { StarSoulManager.Instance.setChangeExpState(starSoul.uid, true); } storeChoose.value = manager.getChangeExpState(starSoul.uid); } } else { storeButton.gameObject.SetActive(true); storeChoose.gameObject.SetActive(false); storeButton.UpdateSoul(starSoul, stateType); } }