I have been reading about component entity design and was wandering how to go about implementing it. I think I have an idea that might work but am confused about one thing. How do you add and remove components. Is it possible to create a new member variable from inside a member function? something like:
or would you have to have an array of components and just add and remove from that?
any tips on setting up a component entity design system would be greatly appreciated as I am looking for something new to tinker with.