From 24a8f1b156ea92e7b0ad60052521e1430a77e13f Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 30 Dec 2024 11:41:09 +0100 Subject: fix drop through wall bug --- player/opponent.gd | 2 +- player/player.gd | 2 +- player/player.tscn | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'player') diff --git a/player/opponent.gd b/player/opponent.gd index 7fc2ebf..de967fe 100644 --- a/player/opponent.gd +++ b/player/opponent.gd @@ -51,7 +51,7 @@ func _on_vertical_timer_timeout() -> void: if randi_range(0, 100) > 75 and is_below_ledge(): await jump() - elif randi_range(0, 100) > 50 and not is_on_bottom_floor(): + elif randi_range(0, 100) > 50 and not is_on_solid_floor(): await fall() $VerticalTimer.start() diff --git a/player/player.gd b/player/player.gd index 9d1d6ee..86284ae 100644 --- a/player/player.gd +++ b/player/player.gd @@ -27,7 +27,7 @@ func _process(_delta: float) -> void: if Input.is_action_pressed("ui_up"): jump() if Input.is_action_pressed("ui_down"): - if not is_on_bottom_floor(): + if not is_on_solid_floor(): fall() if not is_on_floor(): diff --git a/player/player.tscn b/player/player.tscn index 4e0417f..8c86475 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -19,6 +19,12 @@ collision_mask = 18 [node name="Camera2D" type="Camera2D" parent="." index="2"] +[node name="RayDownLeft" parent="." index="7"] +position = Vector2(-5, 0) + +[node name="RayDownRight" parent="." index="8"] +position = Vector2(5, 0) + [node name="ShoeItemPickUp" type="AudioStreamPlayer" parent="." index="9"] stream = ExtResource("3_o0r1j") -- cgit v1.2.3