Open cpbeto opened 2 years ago
I propose both IntervalSystem and IntervalIteratingSystem provide a constructor that takes only the parameter float interval.
IntervalSystem
IntervalIteratingSystem
float interval
For example:
public IntervalSystem(float interval) { super(null); this.interval = interval; } public IntervalIteratingSystem(float interval) { super(interval); }
I think this would make it more idiomatic to write extended systems, which use annotations for entity subscriptions. For example:
@All({Component1.class, Component2.class}) @Exclude(Component3.class) public class MyIntervalSystem extends IntervalIteratingSystem { public MyIntervalSystem(float interval) { super(interval); // etc. } @Override protected void process(int entityId) { // etc. } }
... instead of calling super(null, interval).
super(null, interval)
Cheers :+1:
I propose both
IntervalSystem
andIntervalIteratingSystem
provide a constructor that takes only the parameterfloat interval
.For example:
I think this would make it more idiomatic to write extended systems, which use annotations for entity subscriptions. For example:
... instead of calling
super(null, interval)
.Cheers :+1: