From bd777ff17258293c83b3a086d765b38bb9fe5197 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 25 Jul 2024 14:53:55 +0200 Subject: pc: join and quit button --- pixel-client/src/game.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'pixel-client/src/game.rs') 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> { 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) { -- cgit v1.2.3-70-g09d2