Closed yarbelk closed 8 years ago
I also think it would be good to implement some of the standard library interfaces on top of this (like sort.Interface). Which I added. Sometimes you want to deal with the O=n log n lookups of a sorted slice rather than the muxer needed for a map, or a plain loop over all elements
If I want to be able to easily look up an entity by its ID, I would need to easily store purely based on ID; one solution to this is:
The benefit of this is I can register something in one system, and the dynamically check to see if whatever that entity was implements a specific interface at run time. this means I don't need to store as many 'half implemented' subsets of the entities, and i will have less duplicated code. The only thing I need to store in the system itself would be the ID, and the information specific to the system.