public override IEnumerator <RumorYield> Exec(Engine.Rumor rumor) { var value = Evaluate(rumor); if (value != null && (value.IsBool() && value.AsBool() || value.IsFloat() && value.AsFloat() != 0 || value.IsInt() && value.AsInt() != 0 || value.IsString() && value.AsString() != "" || value.IsObject() && value.AsObject() != null)) { rumor.EnterBlock(Children); } else { if (elif != null) { var yield = elif.Exec(rumor); while (yield.MoveNext()) { yield return(yield.Current); } } } yield return(null); }
public override IEnumerator <RumorYield> Run(Engine.Rumor rumor) { return(conditional.Exec(rumor)); }