Arv
class Character
{
public string name;
public int hp = 100;
public int x = 0;
public int y = 0;
public void Hurt(int amount)
{
hp -= amount;
}
}class Hero: Character
{
int _xp = 0;
int _level = 1;
public AddExperience(int amount)
{
_xp += amount;
_level = 1 + _xp / 10;
}
}Last updated