예제 #1
0
 /// <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;
     }
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
 /// <summary>
 ///Sets the current category
 /// </summary>
 /// <param name="category"> used for setting current category
 public void SetCurrentCategory(LEVEL_CATEGORY category)
 {
     _currentCategory = category;
 }
예제 #4
0
 /// <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;
 }