Andidy / engine-v2

1 stars 0 forks source link

Add component indices to the constructor of struct Entity #3

Closed Andidy closed 3 years ago

Andidy commented 3 years ago

struct Entity has indices into the std::vectors in struct GameState. These should be populated inside the constructor of struct Entity.

Here is an example of the struct Entity constructor with the components: cTransform and cGridTransform already filled out.

https://github.com/Andidy/engine-v2/blob/d3f47492e45b14edad01d5dbbcfa1d88cdd094d3/engine-v2/src/entity.h#L24-L29