public void SetInfo() { UserAttrs attr = UserManager.Instance.userAttr; if (attr != null) { pop.SetName(UserManager.Instance.nickName); pop.SetSign(UserManager.Instance.signTxt); pop.level.text = UserManager.Instance.level.ToString(); pop.vip.text = UserManager.Instance.vip_level.ToString(); pop.power.text = ((int)attr.attrArr[(int)Def.AttrType.FightPower]).ToString(); pop.crit.text = ((int)attr.attrArr[(int)Def.AttrType.Crit]).ToString(); pop.defense.text = ((int)attr.attrArr[(int)Def.AttrType.Defense]).ToString(); pop.pray.text = ((int)attr.attrArr[(int)Def.AttrType.Pray]).ToString(); pop.sign.text = UserManager.Instance.signTxt; if (UserManager.Instance.GetCurRole() != null && UserManager.Instance.GetCurRole().starData != null) { pop.rolePower.text = (UserManager.Instance.GetCurRole().starData.battleAddition[(int)Def.AttrType.FightPower]).ToString() + "%"; pop.roleCrit.text = (UserManager.Instance.GetCurRole().starData.battleAddition[(int)Def.AttrType.Crit]).ToString() + "%"; pop.SetWakeLevel(UserManager.Instance.GetCurRole().wakeLevel); pop.anim.skeletonDataAsset = GameShared.Instance.GetSkeletonAssetByPath(UserManager.Instance.GetCurRole().path); pop.anim.Reset(); } else { pop.rolePower.text = 0 + ""; pop.roleCrit.text = 0 + ""; } } string[] s = UserManager.Instance.GetCurRole().starData.strs.Split('*'); pop.SetTalk(s[0]); }
public void RestUserAttr() { if (userAttr == null) { userAttr = new UserAttrs(); } userAttr.RestUserAttr((int)level); }