ECS programming pattern question
Posted: Mon Jun 18, 2018 8:00 am
Hi all,
I am working with an ECS library (specifically HooECS which is based on lovetoys).
In one of my Systems I check if the player is firing and construct a new projectile entity if she is. This entity needs to be added to the Engine so that it becomes part of the game world, but I see no obvious way to do this.
The library does not provide a reference to the engine in the systems, which was my first thought. I added this functionality myself since it is only 1 line of code but I was wondering if there is a more ECS idiomatic way to do this.
I am working with an ECS library (specifically HooECS which is based on lovetoys).
In one of my Systems I check if the player is firing and construct a new projectile entity if she is. This entity needs to be added to the Engine so that it becomes part of the game world, but I see no obvious way to do this.
The library does not provide a reference to the engine in the systems, which was my first thought. I added this functionality myself since it is only 1 line of code but I was wondering if there is a more ECS idiomatic way to do this.