Improve ECS
Use query_one_mut instead of query_mut for single objects
This commit is contained in:
parent
b793bec63a
commit
cdbac0d4ab
3 changed files with 12 additions and 21 deletions
|
|
@ -72,7 +72,6 @@ impl Renderer for GliumRenderer {
|
|||
let mut frame = self.display.draw();
|
||||
frame.clear_color_and_depth((0.1, 0.1, 0.15, 1.0), 1.0);
|
||||
|
||||
// Expect exactly one active camera in the world.
|
||||
let cam = match world.query::<&Camera>().iter().next() {
|
||||
Some((_, cam)) => *cam,
|
||||
None => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue