Compare commits

..

4 Commits

Author SHA1 Message Date
c9cb24281b Update score view properly upon death 2026-07-22 22:50:50 +03:00
0ebefb4776 Improve Label3D resolution 2026-07-22 22:48:16 +03:00
8c38cbdb90 Fix jumping 2026-07-22 22:46:56 +03:00
109a0077ca Fix camera unlocking upon death 2026-07-22 22:43:53 +03:00
4 changed files with 14 additions and 5 deletions

View File

@ -38,4 +38,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8724979, -0.2644562)
[node name="name_label" type="Label3D" parent="." unique_id=142179925]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.3304863, 0)
pixel_size = 0.002
billboard = 1
text = "asd"
font_size = 64

View File

@ -176,7 +176,7 @@ pub struct Game {
player_counter: u16,
pub self_id: Option<u16>,
pub players: Vec<Player>,
game_started: bool,
pub game_started: bool,
pub current_map: Option<Gd<Map>>,
pub world_ball: Option<Gd<Ball>>,
@ -299,6 +299,8 @@ impl Game {
}
pub fn finish_game(&mut self) {
self.game_started = false;
for player in &mut self.players {
if let Some(mut character) = player.character.take() {
character.queue_free();
@ -320,7 +322,6 @@ impl Game {
ball.queue_free();
}
self.current_map.take();
self.game_started = false;
self.run_deferred(|s| {
if let Some(peer) = &mut NetworkManager::singleton().bind_mut().peer

View File

@ -436,8 +436,8 @@ impl ICharacterBody3D for LocalPlayer {
let input_direction = if self.locked {
let input = Input::singleton();
if self.base().is_on_floor() && input.is_action_just_pressed("jump") {
self.try_jump();
if input.is_action_just_pressed("jump") {
self.jump();
}
Vector3::RIGHT * input.is_action_pressed("right") as u32 as f32
@ -530,7 +530,11 @@ impl ICharacterBody3D for LocalPlayer {
}
fn exit_tree(&mut self) {
self.set_lock(false);
if let Some(game) = Game::singleton()
&& !game.bind().game_started
{
self.set_lock(false);
}
}
}

View File

@ -36,6 +36,7 @@ impl IHBoxContainer for SimpleScoreView {
.on_goal()
.connect_other(s, |s| s.update_goals());
}
s.update_goals();
});
}
}