示例#1
0
        public void AddXp(int xp)
        {
            Status.AddXp(xp);

            if (Status.XP >= GameProgressTable.GetXpForLevel(Level + 1))
            {
                LevelUp();
            }
        }
示例#2
0
 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);
 }