/// <summary>
 /// Check if a rule flag is the ONLY flag set.
 /// </summary>
 /// <param name="rule">The rule to check.</param>
 /// <returns>True if only flag set, false otherwise.</returns>
 public bool IsOnlyRuleSet(ValidRelatives rule)
 {
     return validRelatives == rule;
 }
 /// <summary>
 /// Check if a rule flag is set.
 /// </summary>
 /// <param name="rule">The rule to check.</param>
 /// <returns>True if set, false otherwise.</returns>
 public bool IsRuleSet(ValidRelatives rule)
 {
     return (validRelatives & rule) != 0;
 }
 /// <summary>
 /// Restricts this field to only accept Objects that follow the rules
 /// set by <see cref="validRelatives"/>
 /// </summary>
 public RelativesOnlyAttribute(ValidRelatives validRelatives)
 {
     this.validRelatives = validRelatives;
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Check if a rule flag is set.
 /// </summary>
 /// <param name="rule">The rule to check.</param>
 /// <returns>True if set, false otherwise.</returns>
 public bool IsRuleSet(ValidRelatives rule)
 {
     return((ValidRelatives & rule) != 0);
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Check if a rule flag is the ONLY flag set.
 /// </summary>
 /// <param name="rule">The rule to check.</param>
 /// <returns>True if only flag set, false otherwise.</returns>
 public bool IsOnlyRuleSet(ValidRelatives rule)
 {
     return(ValidRelatives == rule);
 }
Ejemplo n.º 6
0
 /// <summary>
 ///     Restricts this field to only accept Objects that follow the rules
 ///     set by <see cref="ValidRelatives" />
 /// </summary>
 public RelativesOnlyAttribute(ValidRelatives validRelatives)
 {
     ValidRelatives = validRelatives;
 }
Ejemplo n.º 7
0
 /// <summary>
 ///     Restricts this field to only accept Objects that are in the same
 ///     path in the Hierarchy as GameObject that owns this field.
 /// </summary>
 public RelativesOnlyAttribute()
 {
     ValidRelatives = ValidRelatives.SameHierarchyPath;
 }