Closed CreamyCookie closed 7 years ago
WorldConfigurationBuilder.with is identical to WorldConfigurationBuilder.withPassive and passive systems have been removed.
oops, that shouldn't be there anymore.
btw. Why were passive systems removed and how can I achieve the same now?
SystemInvocationStrategy allows more sophisticated execution flows. why do you want passive systems?
SystemInvocationStrategy allows more sophisticated execution flows. why do you want passive systems?
Basically I want to seperate logic and render systems so I can implement something like deWiTTERS Game Loop. I've seen TomGrill/logic-render-game-loop, but I'm not too happy to have my game loop inside an InvocationStrategy subclass. I'd rather let my LibGDX game loop control artemis, but I guess I can do everything inside a system instead of in the screen class. I'll try for now if everything works out with InvocationStrategy.
Another question: How do you pass context like the Game
managing the screens to the systems? A singleton or just an interface containing a setContext
method, that systems implement?
Well, you could write an InvocationStrategy so that it's only explicitly invoked.
Another question: How do you pass context like the Game managing the screens to the systems?
Register the object with the DI:
Director director = ...;
WorldConfiguration wc = new WorldConfiguration();
wc.register(director);
// and so on
then, in your systems:
@Wire
private Director director;
Well, you could write an InvocationStrategy so that it's only explicitly invoked.
Yeah, that's true. I try to keep that in mind if issues arise.
Register the object with the DI:
Ah.. good idea. Thank you! :)
you can also name instance, if you to register multiple instances: https://github.com/junkdog/artemis-odb/wiki/@Wire
(feel free to re-open if you have more questions)
@junkdog Cool, thanks, but isn't withPassive
still there? (Also it seems like I couldn't reopen it, even if I wanted, weirdly enough.. I'm pretty sure that worked in the past though.)
WorldConfigurationBuilder.with
is identical toWorldConfigurationBuilder.withPassive
and passive systems have been removed.btw. Why were passive systems removed and how can I achieve the same now?