Example #1
0
    private void CheckForLevelUp()
    {
        var level      = _Levels.Where(l => l.Value <= _Xp).ToList().OrderByDescending(l => l.Value).First();
        var difference = level.Key - _Level;

        if (difference > 0)
        {
            for (int i = 0; i < difference; i++)
            {
                _Level++;
                SkillSlot.UpdateSlotLevel(_Level.ToString());
            }
        }
    }