新手学编写游戏属性计算器问题!!急!
private void Upgrade()
{
int grade=int.Parse(this.txtGrade.Text);
for (int i = 0; i <= grade; i++) //级别每增加1级增加的属性
{
double number,corporeity, alchemy, strength, stamina, celerity;
number = double.Parse(this.txtNumber.Text); //可用属性
corporeity = double.Parse(this.txtCorporeity.Text); //体质
alchemy = double.Parse(this.txtAlchemy.Text); //魔力
strength = double.Parse(this.txtStrength.Text); //力量
stamina = double.Parse(this.txtStamina.Text); //耐力
celerity = double.Parse(this.txtCelerity.Text); //敏捷
number+=5;
corporeity++;
alchemy++;
strength++;
stamina++;
celerity++;
this.txtNumber.Text = number.ToString(); //升级后可用属性
this.txtCorporeity.Text = corporeity.ToString(); //升级后体质
this.txtAlchemy.Text = alchemy.ToString(); //升级后魔力