private void ShowStat() { _tempRole = new UserRole(); _tempRole.GameRole = _curRoleUpgrade.GameRole; _tempRole.Base = _curRoleUpgrade.Base; _tempRole.Attrib = _curRoleUpgrade.Attrib; _tempRole.AddExp(_addEXP); _tempRole.RoleItems.AddRange(_curRoleUpgrade.RoleItems); _tempRole.InitAttrib(); statManager.SetRole(_curRoleUpgrade, _tempRole); }
public void OnReciveFormServer() { int[] feedIDs = (from item in _feeds select item.Value.role.Id).ToArray(); foreach (int id in feedIDs) { UserRole role = GameManager.GameUser.UserRoles.FirstOrDefault(p => p.Id == id); if (role != null) { GameManager.GameUser.UserRoles.Remove(role); } } _status = Status.Rotate; _speed = 0; _timer = Time.time; _curRoleUpgrade.AddExp(_addEXP); }
public void AddExp(int exp) { _role.AddExp((int)exp); expBar.value = (float)_role.Base.Exp / (float)RoleConfig.LEVELS_EXP[_role.Base.Level]; }