/// <summary> /// Function that loads all the levels from the given category /// </summary> /// <param name="category"> used for getting its levels public void StartLevelCategory(LEVEL_CATEGORY category) { if (category != LEVEL_CATEGORY.CHALLENGE) { _currentCategory = category; // Read the levels for a given category, e.g. BEGINNER List <Level> levels = _levelReader.CreateLevels(_currentCategory); // Store the levels read in a dictionary all category levels _categoryLevels[_currentCategory] = levels; _isChallenge = false; } }
/// <summary> /// Gets the max level of the category given /// </summary> /// <param name="category"> category given public int GetMaxLevel(LEVEL_CATEGORY category) { return(_categoryMaxLevel[category].maxLevel); }
/// <summary> ///Sets the current category /// </summary> /// <param name="category"> used for setting current category public void SetCurrentCategory(LEVEL_CATEGORY category) { _currentCategory = category; }
/// <summary> /// Function that sets the new max level /// </summary> /// <param name="category"> used for setting its max level public void SetMaxLevelFromCategory(LEVEL_CATEGORY category, int max) { _categoryMaxLevel[category].maxLevel = max; }