Пример #1
0
        /// <summary>
        /// Creates a new perk.
        /// </summary>
        /// <param name="category">The category under which this perk is grouped.</param>
        /// <param name="type">The type of perk.</param>
        /// <returns>A perk builder with the configured options</returns>
        public PerkBuilder Create(PerkCategoryType category, PerkType type)
        {
            _activeLevel = null;

            _activePerk = new PerkDetail
            {
                Category = category,
                Type     = type,
                IsActive = true
            };
            _perks[type] = _activePerk;

            return(this);
        }
Пример #2
0
 /// <summary>
 /// Retrieves details about an individual perk category.
 /// </summary>
 /// <param name="categoryType">The type of category to retrieve.</param>
 /// <returns>An object containing a perk category's details.</returns>
 public static PerkCategoryAttribute GetPerkCategoryDetails(PerkCategoryType categoryType)
 {
     return(_allCategories[categoryType]);
 }