Support an Open Source Developer! :hearts:
A simple macro to effectively create SPECS systems.
Add the following to your Cargo.toml file:
specs_declaration = "*"
```rust use specs::*;
system!(SystemName, |velocity: WriteStorage<'a, Velocity>| { for vel in (&velocity,).join() { println!("velocity: {}, {}, {}", vel.x, vel.y, vel.z); } }); ```
With generics:
```rust use specs::*;
system!(SystemName
for vel in (&velocity,).join() {
println!("velocity: {}, {}, {}", vel.x, vel.y, vel.z);
}
}); ```
Consider donating on my patreon if you find this useful!