public override void OnInit(ITraitContainer container) { var m = container.NewMatcher(); m.HasTrait <Renderer>().HasTag(Renderer.Loaded).HasTrait <Movement>().HasTag(Movement.Inited); this.filter = container.GetFilter(this, TupleType.Job, m); }
public override void OnInit(ITraitContainer container) { var initMatcher = container.NewMatcher(); initMatcher.HasTrait <Effect>() .ExceptTag(Effect.Inited) .HasTrait <Renderer>() .HasTag(Renderer.Loaded); this.initFilter = container.GetFilter(this, TupleType.Job, initMatcher); var updateMatcher = container.NewMatcher(); updateMatcher.HasTrait <Effect>() .HasTag(Effect.Inited); this.updateFilter = container.GetFilter(this, TupleType.Job, updateMatcher); }
public override void OnInit(ITraitContainer container) { this.container = container; var m = container.NewMatcher(); m.HasTrait <Window>().HasTag(Window.Inited); this.filter = container.GetFilter(this, TupleType.Job, m); }