From 8d1e7ab11e2037da92f37495038e66e980adf7ac Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 27 Jul 2024 13:10:26 +0200 Subject: pc: wrap background position --- pixel-client/src/menu/background.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'pixel-client/src') diff --git a/pixel-client/src/menu/background.rs b/pixel-client/src/menu/background.rs index dd5ab97c..9f385d38 100644 --- a/pixel-client/src/menu/background.rs +++ b/pixel-client/src/menu/background.rs @@ -67,6 +67,7 @@ impl MenuBackground { pub fn tick(&mut self, dt: f32) { self.background += Vec2::new(2., 3.) * dt; + self.background %= 256.; } pub fn draw(&self, ctx: &mut Renderer) { ctx.set_world_view( -- cgit v1.2.3-70-g09d2