public void AddXp(int xp) { Status.AddXp(xp); if (Status.XP >= GameProgressTable.GetXpForLevel(Level + 1)) { LevelUp(); } }
private void LevelUp() { Status.XP -= GameProgressTable.GetXpForLevel(Level + 1); SetLevel(Level + 1); if (this is Player) { ((Player)this).UpgradePoints += 10; } Message("Level up! You are now level " + Level); }