New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow adding assets to states from plugins #81
Comments
I have not seen a use case for this so far. Can you explain what you want the possibility to configure a loading state across multiple plugins for? In my own code bases, I would like them to be configured in one plugin to make it easier to follow. The biggest pain point I would have with this kind of API is that the user needs to remember to call |
I divided my game (toy but I'm trying to do it properly) into files and treat each component as plugin. So player is a plugin, mob is a plugin, board is a plugin etc. |
So you want to add the collections concerning the player in the player plugin, the board in the board plugin and so on? This should already be possible. You can add identical loading states with different collections and they will get combined. |
I missed this from documentation. Can it be treated as documentation bug then? |
Yes, I can add that to the readme and consider this issue closed as soon as the functionality is documented. |
Currently the only (official) way to describe the loading transitions is from
fn main
function. For bigger projects, from what I understand, plugins are often used.I wrote very quick'n'dirty proof-of-concept:
(It would probably be able to expose simpler interface if
LoadingState
changed fromfn foo(self) -> Self
tofn foo(&mut self) -> &mut Self
).This way the loading can be constructed as:
(I suspect that
complete_loading
can be avoided with 'native' loading)The text was updated successfully, but these errors were encountered: