Skip to content

Instantly share code, notes, and snippets.

@KumoKairo
Created March 4, 2017 13:16
Show Gist options
  • Save KumoKairo/73ece86b0d416746ab4fd3b022aa734b to your computer and use it in GitHub Desktop.
Save KumoKairo/73ece86b0d416746ab4fd3b022aa734b to your computer and use it in GitHub Desktop.
// Works
protected override Collector<GameEntity> GetTrigger(IContext<GameEntity> context)
{
return new Collector<GameEntity>(
new []
{
context.GetGroup(GameMatcher.Machine),
context.GetGroup(GameMatcher.JustRepaired)
},
new []
{
GroupEvent.Added,
GroupEvent.Added
});
}
// Doesn't
protected override Collector<GameEntity> GetTrigger(IContext<GameEntity> context)
{
return context.CreateCollector(Matcher<GameEntity>.AnyOf(GameMatcher.Machine, GameMatcher.JustRepaired));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment