Got it! So time is a resource. An unrelated quick question:
In my state’s initialization/setup function, I’m generating some entities (just like how the pong tutorial says to do it). However, I also need to generate entities in my actual system in response to some changes. Because the way the entities generate is identical, DRY says I should only have one function that does that.
Idiomatically, where would this function go? In the state, then within the system find the state and call it? Or in the state, and within the system find the state and call it? Or somewhere totally unrelated?
The state gets a World struct while the system gets an Entities thing. So how could I possibly interchange them? I’d need two functions: one that does it through the entities thing and one that does it through a World struct. This doesn’t seem very clean. Yet spawning something on initialization and within frames is a common thing.
It also seems like the system “setup” function also gets a world — which would once again make the creature spawning function non-interchangeable.
Additionally where should the sprite sheet handle for this entity be stored? As a resource? In the state struct? Or in the system struct?