pub fn update_positions(&mut self) {
        // Get every object that has both a Position and a Velocity.
        let query = <(Write<Position>, Read<Velocity>)>::query();

        for (mut position, velocity) in query.iter(&mut self.world) {
            // Update position based on the velocity
            position.x += velocity.x * TICK_DURATION;
            position.y += velocity.y * TICK_DURATION;
        }
    }
/// Updates the current position of every object in the world based on its velocity.
Updates the current position of every object in the world based on its velocity.
Updates the current position of every object in the world based on its velocity .
pub fn update_positions(&mut self) {
        // Get every object that has both a Position and a Velocity.
        let query = <(Write<Position>, Read<Velocity>)>::query();
        for (mut position, velocity) in query.iter(&mut self.world) {
            // Update position based on the velocity
            position.x += velocity.x * TICK_DURATION;
            position.y += velocity.y * TICK_DURATION;
        }
    }
pub fn update_positions ( & mut self ) { // Get every object that has both a Position and a Velocity. let query = < ( Write < Position > , Read < Velocity > ) > :: query ( ) ; for ( mut position , velocity ) in query . iter ( & mut self . world ) { // Update position based on the velocity position . x += velocity . x * TICK_DURATION ; position . y += velocity . y * TICK_DURATION ; } }
Updates the current position of every object in the world based on its velocity.
Updates the current position of every object in the world based on its velocity .
&mut self
&mut self