void assingLevel(Class _class, Attributes _attributes) { this.totalExperience += this.currentExperience; while (this.currentExperience > this.nextExperience) { if (this.currentExperience >= this.nextExperience) { this.nivel++; this.levelPoints.assingPoints(); this.currentExperience -= this.nextExperience; this.lastExperience = this.nextExperience; this.nextExperience *= this.modify; if (_class.typeClass != _Class.None) _attributes.attributePerLevel(_class); } } }
public void addExperience(double _experience, Class _class, Attributes _attributes) { this.currentExperience += _experience; this.assingLevel(_class, _attributes); }
public void attributePerLevel(Class _class) { if( _class.typeClass == _Class.Warrior) { this.strength += _Normalized * _class.classModifier; this.stamina += _Normalized; this.intelligence += _Normalized; this.agility += _Normalized; } else if (_class.typeClass == _Class.Archer) { this.strength += _Normalized; this.stamina += _Normalized; this.intelligence += _Normalized; this.agility += _Normalized * _class.classModifier; } else if (_class.typeClass == _Class.Wizard) { this.strength += _Normalized; this.stamina += _Normalized; this.intelligence += _Normalized * _class.classModifier; this.agility += _Normalized; } else if (_class.typeClass == _Class.Priest) { this.strength += _Normalized; this.stamina += _Normalized; this.intelligence += _NormalizedOther * _class.classModifier; this.agility += _Normalized; } }