struct Background { texture: Texture, pos_y: f64, down: bool, } impl Background { fn move_background(&mut self){ if self.down{ self.pos_y-=1.5; if self.pos_y < -1100.0 { self.pos_y = 0.0; } } } }