amethyst / specs

Specs - Parallel ECS
https://amethyst.github.io/specs/
Apache License 2.0
2.49k stars 219 forks source link

Question: Exporting from library? #665

Open cheako opened 4 years ago

cheako commented 4 years ago

https://youtu.be/Q86V5DnSPPs?t=539 https://gitlab.com/cheako/hazel-rs/blob/1c04d1446a5a1c3628f4fba577ec276313cb93ea/src/renderer/r2d.rs#L432-593

I'd like to create some components and then have a function that takes an entity and figures out what components it has and call the appropriate function. I'd also like to write systems, but that's not the main focus.

Edit: Missing a selection for questions.

cheako commented 4 years ago

This is my solution in the meantime, just an enum and Vec. https://gitlab.com/cheako/hazel-rs/-/blob/a4537ebdbd40fa9421975e9d7ac7c27d0f28f3a9/src/renderer/r2d.rs#L71