public void GainExperience(float value) { float overflow = Experience.Change(value); while (overflow > 0) { Rank++; RankUp(); Experience.Change(-Experience.MaxValue); Experience.MaxValue = Rank * 40 + 100; overflow = Experience.Change(overflow); } }