Comments (3)
I managed to do it like this:
#[system]
fn beam_array_damage_update(
targets: &mut Query<(Entity, &mut Hull, Option<&mut Shield>)>,
sender: &mut Query<(&BeamArray, &TargetingConsole)>,
world: &mut SubWorld,
#[resource] dt: &DeltaTime
) {
...
}
I didn't know this was even a thing, until I read this issue and the amethyst docs linked in it.
But as you said for a complex filter my solution probably won't work.
from legion.
For the example's sake, lets try to add in a filter that optionally gives me the Shield
component
from legion.
I was not working with filters by myself yet, but as I can see from the #[system]
documentation you can only apply filters to a single query (when the system is defined with #[system(for_each)]
or #[system(par_for_each)]
). The example you provided attempts to work with two different queries at the same time, and the #[system]
macro does not have a way to describe filters in that case.
from legion.
Related Issues (20)
- Should maybe_changed always match at least once?
- Failed World::clone_from(), because of missing Duplicate::register_clone(), asserts
- Include license file in legion_codegen crate
- Make `KnownLength` public
- Using systems and scheduler in wasm? HOT 1
- Idiomatic way of removing specific entities HOT 3
- Resources are marked as !Send and !Sync? HOT 2
- Game map questions (Resource vs Entity) HOT 1
- how to remove/stop system? HOT 2
- How to get component/components from a particular entity? HOT 2
- Fallible systems
- Is there way to push entities with dynamic components?
- Query with ordering / sorting?
- Prototype game no longer working in browser after adding legion
- Delete entities based on component? HOT 2
- Is project dead? HOT 2
- Linking legion entities with rapier2d colliders.
- can't build at webassembly
- crossbeam-0.1.6 cannot transmute between types of different sizes, or dependently-sized types
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legion.