示例#1
0
		/// <summary>
		/// Check for if this slot affix was blocked.
		/// </summary>
		/// <param name="headFeats">The head features.</param>
		/// <returns>
		/// 	<c>true</c> if this slot affix was blocked, otherwise <c>false</c>.
		/// </returns>
		bool IsBlockedSlotAffix(FeatureValues headFeats)
		{
			if (RealizationalFeatures.NumFeatures == 0 || headFeats == null)
				return false;

			foreach (Feature feature in RealizationalFeatures.Features)
			{
				if (!headFeats.ContainsFeature(feature))
					return false;
			}
			return true;
		}
示例#2
0
        /// <summary>
        /// Check for if this slot affix was blocked.
        /// </summary>
        /// <param name="headFeats">The head features.</param>
        /// <returns>
        ///     <c>true</c> if this slot affix was blocked, otherwise <c>false</c>.
        /// </returns>
        bool IsBlockedSlotAffix(FeatureValues headFeats)
        {
            if (RealizationalFeatures.NumFeatures == 0 || headFeats == null)
            {
                return(false);
            }

            foreach (Feature feature in RealizationalFeatures.Features)
            {
                if (!headFeats.ContainsFeature(feature))
                {
                    return(false);
                }
            }
            return(true);
        }
        /// <summary>
        /// Determines whether this set of feature values contains the specified feature.
        /// </summary>
        /// <param name="feature">The feature.</param>
        /// <returns>
        ///     <c>true</c> if this set contains the specified feature, otherwise <c>false</c>.
        /// </returns>
        public bool ContainsFeature(Feature feature)
        {
            ValueInstance value;

            if (!m_values.TryGetValue(feature, out value))
            {
                return(false);
            }

            FeatureValues fvs = value as FeatureValues;

            foreach (Feature sf in feature.SubFeatures)
            {
                if (fvs == null || !fvs.ContainsFeature(sf))
                {
                    return(false);
                }
            }
            return(true);
        }