//public void OnClickSelf() //{ // UI_HomeControler.Inst.AddUI("UI_Home/UI_ItemMessage_2_2"); // UI_Item._instance.UpdateShow(mItem); //} //显示英雄信息界面详细信息界面 public void InitCardDetailedData(int num, ObjectCard _card) { CardDetailedDataName = selfTransform.FindChild("Name").GetComponent <Text>(); CardDetailedDataBaseValue = selfTransform.FindChild("BaseValue").GetComponent <Text>(); CardDetailedDataBuffValue = selfTransform.FindChild("BuffValue").GetComponent <Text>(); switch (num) { case 1: //生命值 { CardDetailedDataName.text = GameUtils.getString("baseattribute1des"); CardDetailedDataBaseValue.text = _card.GetBaseMaxHP().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetMaxHP() - _card.GetBaseMaxHP()).ToString(); } break; case 2: //物理攻击力 { CardDetailedDataName.text = GameUtils.getString("baseattribute2des"); CardDetailedDataBaseValue.text = _card.GetPhysicalBaseAttack().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetPhysicalAttack() - _card.GetPhysicalBaseAttack()).ToString(); } break; case 3: //法术攻击力 { CardDetailedDataName.text = GameUtils.getString("baseattribute4des"); CardDetailedDataBaseValue.text = _card.GetMagicBaseAttack().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetMagicAttack() - _card.GetMagicBaseAttack()).ToString(); } break; case 4: //物理防御力 { CardDetailedDataName.text = GameUtils.getString("baseattribute3des"); CardDetailedDataBaseValue.text = _card.GetPhysicalBaseDefence().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetPhysicalDefence() - _card.GetPhysicalBaseDefence()).ToString(); } break; case 5: //法术防御力 { CardDetailedDataName.text = GameUtils.getString("baseattribute5des"); CardDetailedDataBaseValue.text = _card.GetMagicBaseDefence().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetMagicDefence() - _card.GetMagicBaseDefence()).ToString(); } break; case 6: //命中 { CardDetailedDataName.text = GameUtils.getString("baseattribute6des"); CardDetailedDataBaseValue.text = _card.GetBaseHit().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetHit() - _card.GetBaseHit()).ToString(); } break; case 7: //闪避 { CardDetailedDataName.text = GameUtils.getString("baseattribute7des"); CardDetailedDataBaseValue.text = _card.GetBaseDodge().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetDodge() - _card.GetBaseDodge()).ToString(); } break; case 8: //暴击 { CardDetailedDataName.text = GameUtils.getString("baseattribute8des"); CardDetailedDataBaseValue.text = _card.GetBaseCritical().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetCritical() - _card.GetBaseCritical()).ToString(); } break; case 9: //暴击伤害率 { CardDetailedDataName.text = GameUtils.getString("baseattribute16des"); CardDetailedDataBaseValue.text = _card.GetCriticalHurtAddRate() * 100 + "%"; CardDetailedDataBuffValue.text = "+" + (_card.GetCriticalHurtAddRate() - _card.GetCriticalHurtAddRate()).ToString(); } break; case 10: //韧性 { CardDetailedDataName.text = GameUtils.getString("baseattribute9des"); CardDetailedDataBaseValue.text = _card.GetBaseTenacity().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetTenacity() - _card.GetBaseTenacity()).ToString(); } break; case 11: //速度 { CardDetailedDataName.text = GameUtils.getString("baseattribute10des"); CardDetailedDataBaseValue.text = _card.GetBaseSpeed().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetSpeed() - _card.GetBaseSpeed()).ToString(); } break; case 12: //生命恢复力 { CardDetailedDataName.text = GameUtils.getString("baseattribute11des"); CardDetailedDataBaseValue.text = _card.GetHpRecover().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetHpRecover() - _card.GetHpRecover()).ToString(); } break; case 13: //初始怒气值 { CardDetailedDataName.text = GameUtils.getString("baseattribute25des"); CardDetailedDataBaseValue.text = _card.GetInitPowerAddition().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetInitPowerAddition() - _card.GetInitPowerAddition()).ToString(); } break; case 14: //物理伤害加深率 { CardDetailedDataName.text = GameUtils.getString("baseattribute20des"); CardDetailedDataBaseValue.text = _card.GetPhysicalHurtAddPermil() * 100 + "%"; CardDetailedDataBuffValue.text = "+" + (_card.GetPhysicalHurtAddPermil() - _card.GetPhysicalHurtAddPermil()).ToString(); } break; case 15: //法术伤害加深率 { CardDetailedDataName.text = GameUtils.getString("baseattribute18des"); CardDetailedDataBaseValue.text = _card.GetMagicHurtAddPermil() * 100 + "%"; CardDetailedDataBuffValue.text = "+" + (_card.GetMagicHurtAddPermil() - _card.GetMagicHurtAddPermil()).ToString(); } break; case 16: //伤害附加值 { CardDetailedDataName.text = GameUtils.getString("baseattribute21des"); CardDetailedDataBaseValue.text = _card.GetExtraHurt().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetExtraHurt() - _card.GetExtraHurt()).ToString(); } break; case 17: //物理伤害减免率 { CardDetailedDataName.text = GameUtils.getString("baseattribute17des"); CardDetailedDataBaseValue.text = _card.GetPhysicalHurtReducePermil() * 100 + "%"; CardDetailedDataBuffValue.text = "+" + (_card.GetPhysicalHurtReducePermil() - _card.GetPhysicalHurtReducePermil()).ToString(); } break; case 18: //法术伤害减免率 { CardDetailedDataName.text = GameUtils.getString("baseattribute19des"); CardDetailedDataBaseValue.text = _card.GetMagicHurtReducePermil() * 100 + "%"; CardDetailedDataBuffValue.text = "+" + (_card.GetMagicHurtReducePermil() - _card.GetMagicHurtReducePermil()).ToString(); } break; case 19: //伤害减免值 { CardDetailedDataName.text = GameUtils.getString("baseattribute22des"); CardDetailedDataBaseValue.text = _card.GetReduceHurtPoint().ToString(); CardDetailedDataBuffValue.text = "+" + (_card.GetReduceHurtPoint() - _card.GetReduceHurtPoint()).ToString(); } break; } }
// 英雄最大属性值 [6/4/2015 Zmy] public float GetHeroMaxAttributeValue(EM_ATTRIBUTE _type) { float[] _attriValue = new float[GlobalMembers.MAX_TEAM_CELL_COUNT]; for (int i = 0; i < GlobalMembers.MAX_TEAM_CELL_COUNT; i++) { ObjectCard pHero = ObjectSelf.GetInstance().HeroContainerBag.FindHero(m_HeroInfo[i]); if (pHero != null) { switch (_type) { case EM_ATTRIBUTE.EM_ATTRIBUTE_MAXHP: _attriValue[i] = pHero.GetMaxHP(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_PHYSICALATTACK: _attriValue[i] = pHero.GetPhysicalAttack(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MAGICATTACK: _attriValue[i] = pHero.GetMagicAttack(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_PHYSICALDEFENCE: _attriValue[i] = pHero.GetPhysicalDefence(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MAGICDEFENCE: _attriValue[i] = pHero.GetMagicDefence(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_HIT: _attriValue[i] = pHero.GetHit(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_DODGE: _attriValue[i] = pHero.GetDodge(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_CRITICAL: _attriValue[i] = pHero.GetCritical(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_TENACITY: _attriValue[i] = pHero.GetTenacity(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MOVESPEED: break; case EM_ATTRIBUTE.EM_ATTRIBUTE_SPEED: _attriValue[i] = pHero.GetSpeed(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_HIT_RATE: _attriValue[i] = pHero.GetHitRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_DODGE_RATE: _attriValue[i] = pHero.GetDodgeRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_CRITICAL_RATE: _attriValue[i] = pHero.GetCriticalRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_TENACITY_RATE: _attriValue[i] = pHero.GetTenacityRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_PHYSICAL_HURT_ADD_PERMIL: _attriValue[i] = pHero.GetPhysicalHurtAddPermil(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_PHYSICAL_HRUT_REDUCE_PERMIL: _attriValue[i] = pHero.GetPhysicalHurtReducePermil(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MAGIC_HURT_ADD_PERMIL: _attriValue[i] = pHero.GetMagicHurtAddPermil(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MAGIC_HURT_REDUCE_PERMIL: _attriValue[i] = pHero.GetMagicHurtReducePermil(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_CRITICAL_HURT_ADD_RATE: _attriValue[i] = pHero.GetCriticalHurtAddRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_CRITICAL_HURT_REDUCE_RATE: _attriValue[i] = pHero.GetCriticalHurtReduceRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_EXTRA_HURT: _attriValue[i] = pHero.GetExtraHurt(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_REDUCE_HURT_POINT: _attriValue[i] = pHero.GetReduceHurtPoint(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_HPRECOVER: _attriValue[i] = pHero.GetHpRecover(); break; default: break; } } } return(GameUtils.MaxValue(_attriValue)); }