[next] System.onStart called multiple times
sh-dave opened this issue · 1 comments
sh-dave commented
https://github.com/sh-dave/eskimo-issues/tree/master/system-multiple-onStart
Using systems with other-system-dependencies, depending on the order systems are added to the SystemManager, System.onStart() is called multiple times.
In this case, S2 depends on S1 and does a get in onStart();
class S2 extends System {
var s1 : S1;
public function new() super([S1]);
override public function onStart( sm : SystemManager ) s1 = sm.get(S1);
}
sm.add(new S1());
sm.add(new S2());
will result in:
trace S1.onStart
trace S2.onStart
sm.add(new S2());
sm.add(new S1());
will result in:
trace S2.onStart
trace S1.onStart
trace S2.onStart
PDeveloper commented
Fixed on eskimo/next, good spot!