I wanted to touch base on how one could go about having delayed logic in an ES game. My example right now is that I want a bomb-projectily entitiy (that has mass, velocity and other components) to stop in the air after some time/distance and gain a gravity well/suction force (to pull in entities nearby) and then blow up. I dont want all the other attributes to disappear, only to change the velocity (in this example) to 0 and add a gravity component.
My first thought was to create a DelayedState that looks at Delayed components. A Delayed component has EntityId target, long delayedMiliseconds, and a set of T implements EntityComponent. Much like the DecayState that looks at the Decay component, the DelayedState would simply look at these Delayed components, see if the time was up and if so apply the set of components to the target entity. Not sure yet if the delayed logic would have to be entities or components on the target (many-to-one or one-to-one)
I gathered from previous posts here that events doesn’t really fit into a ES design, as the systems can already communicate via the components so to speak.
Have you guys done anything of this sort?