private void FormUpdatePlayerLevel() { int playerlvl = PlayerDataV.getPlayerLvl()[0]; labelPlayerLevelNumber.Text = playerlvl.ToString(); for (int i = PlayerLevelNames.Count - 1; i >= 0; i--) { if (PlayerLevelNames[i].LevelLimit <= playerlvl) { labelPlayerLevelName.Text = PlayerLevelNames[i].LevelName; panelPlayerLevel.BackColor = PlayerLevelNames[i].NameColor; break; } } labelPlayerExperience.Text = PlayerDataV.ExperiencePoints.ToString(); labelExperienceNxtLvlThreshhold.Text = "/ " + PlayerDataV.getPlayerLvl()[1].ToString(); }
private void buttonPlayerLvlMin_Click(object sender, EventArgs e) { PlayerDataV.getPlayerExp(0); FormUpdatePlayerLevel(); }
private void buttonPlayerLvlMinus10_Click(object sender, EventArgs e) { PlayerDataV.getPlayerExp(int.Parse(labelPlayerLevelNumber.Text) - 10); FormUpdatePlayerLevel(); }