コード例 #1
0
 /// <summary>Whether the condition matches.</summary>
 /// <param name="context">The condition context.</param>
 public bool IsMatch(ConditionContext context)
 {
     foreach (string conditionValue in context.GetValues(this.Key))
     {
         if (this.Values.Contains(conditionValue))
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #2
0
ファイル: Condition.cs プロジェクト: mit4web/StardewMods
 /// <summary>Whether the condition matches.</summary>
 /// <param name="context">The condition context.</param>
 public bool IsMatch(ConditionContext context)
 {
     return(context
            .GetValues(this.Key)
            .Any(p => this.Values.Contains(p)));
 }