hey, so i am trying to follow this tutorial to get a better understanding of the workings of an RPG
tutorial
the only problem is that i followed the tutorial exactly(except for a few errors on his part) and i am getting some really weird errors, not sure if it is because of the difference in versions or what but i could use a little help.
here is the code that i wrote.
public class BaseStat
{
private int _baseValue; //the base value of the stat.
private int _buffValue; //the amount of the buff to this stat.
private int _expToLevel; //total amount of exp to reach next level.
private float _levelModifier; //the modifier applied to the exp to raise the skill.
public int baseStat()
{
_baseValue = 0;
_buffValue = 0;
_levelModifier = 1.1f;
_expToLevel = 100;
}
//base setters and getters.
public int BaseValue()
{
get{ return _baseValue; }
set{ _baseValue = value }
}
public int BuffValue()
{
get{return _buffValue;}
set{_buffValue = value;}
}
public int ExpToLevel()
{
get{return _expToLevel;}
set{_expToLevel = value;}
}
public float LevelModifier ()
{
get{return _levelModifier;}
set{_levelModifier = value;}
}
private int CalulateExpToLevel()
{
return (int)(_expToLevel * _levelModifier);
}
private void LevelUp()
{
_expToLevel = CalulateExpToLevel;
_baseValue++;
}
public int AdjustedValue()
{
return _baseValue + _buffValue;
}
}