private void UpdatePlayerData() { if (!DataManager.LevelTable.ContainsKey(mOtherData.level)) { return; } LevelTableItem levelRes = DataManager.LevelTable[mOtherData.level] as LevelTableItem; if (levelRes == null) { return; } PropertyOperation op = new PropertyOperation(); PropertyOperation pro = new PropertyOperation(); PropertyBuild.BuildBaseProperty(mOtherData, pro); op.Add(pro); PropertyBuild.BuildEquipProperty(mOtherData, pro); op.Add(pro); PropertyBuild.BuildWeaponProperty(mOtherData, pro); op.Add(pro); PropertyBuild.BuildWingProperty(mOtherData, pro); op.Add(pro); int hp = (int)op.GetPro((int)PropertyTypeEnum.PropertyTypeMaxHP); mHp.text = hp.ToString(); int mp = (int)op.GetPro((int)PropertyTypeEnum.PropertyTypeMaxMana); mMp.text = mp.ToString(); int damage = (int)op.GetPro((int)PropertyTypeEnum.PropertyTypeDamage); mDamage.text = damage.ToString(); int defence = (int)op.GetPro((int)PropertyTypeEnum.PropertyTypeDefance); mDefence.text = defence.ToString(); int crit = (int)op.GetPro((int)PropertyTypeEnum.PropertyTypeCrticalLV); mCritLv.text = crit.ToString(); uint grade = 0; for (int i = 0; i < mOtherData.mGrades.Grades.Length; ++i) { grade += mOtherData.mGrades[i]; } mZhanli1.text = grade.ToString(); mZhanli2.text = "战斗力:" + grade.ToString(); mExp.text = mOtherData.exp.ToString() + "/" + levelRes.exp.ToString(); mName.text = mOtherData.name; mRoleName.text = "Lv " + mOtherData.level.ToString() + "." + mOtherData.name; }
public PropertyOperation GetPlayerProperty() { mPlayerAllProperty.Clear(); mPlayerAllProperty.Add(mPlayerBaseProperty); mPlayerAllProperty.Add(mPlayerEquipProperty); mPlayerAllProperty.Add(mPlayerWeaponProperty); mPlayerAllProperty.Add(mPlayerWingProperty); mPlayerAllProperty.Add(mPlayerFashionProperty); return(mPlayerAllProperty); }