| | |
| | | [SerializeField] Text[] inheritAttrText; //武将会继承的属性 |
| | | [SerializeField] RichText heroAddPerText; //主公(上阵)加成描述 |
| | | [SerializeField] Text[] heroAddAttrPerText; //主公(上阵)加成 |
| | | [SerializeField] Text[] addPerText; //增加百分比(飘动) |
| | | [SerializeField] PositionTween addPerObject; |
| | | [SerializeField] Transform addPerParent; |
| | | [SerializeField] HeroTrainAddAttrCell addPerObject; |
| | | [SerializeField] Image lvupMoneyIcon; |
| | | [SerializeField] Text lvupMoneyText; |
| | | [SerializeField] Text lvupBtnText; |
| | |
| | | [SerializeField] Image redpointAwake; |
| | | [SerializeField] Image redpointGift; |
| | | [SerializeField] Image redpointLVUP; |
| | | |
| | | |
| | | Queue<HeroTrainAddAttrCell> lvupAttrQueue = new Queue<HeroTrainAddAttrCell>(); |
| | | |
| | | string guid; |
| | | HeroInfo hero; |
| | |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | //预显示 |
| | | lvupEffect.Play(); |
| | | addPerObject.SetActive(true); |
| | | for (int i = 0; i < addPerText.Length; i++) |
| | | { |
| | | addPerText[i].text = "+" + PlayerPropertyConfig.GetValueDescription(PlayerPropertyConfig.basePerAttrs[i], hero.qualityConfig.LVAddPer); |
| | | } |
| | | addPerObject.Play(() => |
| | | { |
| | | addPerObject.SetActive(false); |
| | | var cell = RequestCell(); |
| | | cell.transform.localPosition = new Vector3(0, 0, 0); |
| | | cell.Display(hero.qualityConfig.LVAddPer, ()=> |
| | | { |
| | | cell.SetActive(false); |
| | | ReturnCell(cell); |
| | | }); |
| | | |
| | | HeroUIManager.Instance.lastFightPower = new KeyValuePair<string, long>(hero.itemHero.guid, hero.CalculatePower(false)); |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | HeroTrainAddAttrCell RequestCell() |
| | | { |
| | | |
| | | if (lvupAttrQueue.Count == 0) |
| | | { |
| | | return Instantiate(addPerObject, addPerParent); |
| | | } |
| | | return lvupAttrQueue.Dequeue(); |
| | | } |
| | | |
| | | |
| | | void ReturnCell(HeroTrainAddAttrCell cell) |
| | | { |
| | | lvupAttrQueue.Enqueue(cell); |
| | | } |
| | | |
| | | |
| | | void RefreshAllPotential() |
| | | { |
| | | if (!HeroBreakConfig.configDics.ContainsKey(hero.heroId)) |