diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-25 14:53:55 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-25 14:53:55 +0200 |
commit | bd777ff17258293c83b3a086d765b38bb9fe5197 (patch) | |
tree | 253fba54bfcee9be97311900a0b361c1bcc3951e /pixel-client/src/game.rs | |
parent | 3c056d68fe9c28b0c867a8d8bb3d4394745296d0 (diff) | |
download | hurrycurry-bd777ff17258293c83b3a086d765b38bb9fe5197.tar hurrycurry-bd777ff17258293c83b3a086d765b38bb9fe5197.tar.bz2 hurrycurry-bd777ff17258293c83b3a086d765b38bb9fe5197.tar.zst |
pc: join and quit button
Diffstat (limited to 'pixel-client/src/game.rs')
-rw-r--r-- | pixel-client/src/game.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pixel-client/src/game.rs b/pixel-client/src/game.rs index cc1645d9..af387b95 100644 --- a/pixel-client/src/game.rs +++ b/pixel-client/src/game.rs @@ -24,6 +24,7 @@ use crate::{ AtlasLayout, Renderer, }, tilemap::Tilemap, + State, }; use hurrycurry_protocol::{ glam::{IVec2, Vec2}, @@ -106,7 +107,12 @@ impl Game { } } - pub fn tick(&mut self, dt: f32, keyboard: &KeyboardState, layout: &AtlasLayout) { + pub fn tick( + &mut self, + dt: f32, + keyboard: &KeyboardState, + layout: &AtlasLayout, + ) -> Option<Box<State>> { self.network.poll(); // TODO perf @@ -192,7 +198,9 @@ impl Game { self.items_removed.retain_mut(|i| { i.tick(0., dt); i.alive > 0.01 - }) + }); + + None } pub fn packet_in(&mut self, packet: PacketC, layout: &AtlasLayout) { |