We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Can something like this be allowed?
#[derive(SplitFields)] enum AiType { Crawler, Shooter { some_data: i64 }, } #[derive(SplitFields)] struct Unit { #[split(nested)] ai_type: AiType, // other fields }
Perhaps it could be represented as:
#[derive(SplitFields)] struct AiTypeCrawler {} #[derive(SplitFields)] struct AiTypeShooter { some_data: i64, } struct AiTypeStructOf<F: StorageFamily> { Crawler: F::Storage<Option<AiTypeCrawler::StructOf<F>>>, Shooter: F::Storage<Option<AiTypeShooter::StructOf<F>>>, }
And then queries could look like:
for (pos, crawler_ai) in query!(world.units, (&position, &ai_type.Crawler.Get.Some)) { }
Thought, ideally, .Get.Some could be omitted since it is already implied by the enum.
.Get.Some
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Can something like this be allowed?
Perhaps it could be represented as:
And then queries could look like:
Thought, ideally,
.Get.Some
could be omitted since it is already implied by the enum.The text was updated successfully, but these errors were encountered: