Пример #1
0
 public static void AddXP(int amount)
 {
     Instance.XP += amount;
     while (Instance.XP > PlayerLevel.GetNextLevelXPRequirement())
     {
         LevelUp();
     }
     if (Instance.currentLevel > Instance.maxLevel)
     {
         Instance.currentLevel = Instance.maxLevel;
     }
 }