summaryrefslogtreecommitdiff
path: root/player
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-12-30 11:41:09 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-12-30 11:41:14 +0100
commit24a8f1b156ea92e7b0ad60052521e1430a77e13f (patch)
treee2e21d5015e8003e6ba40dc85a19bc9d523e249f /player
parent474ef692613f298ab05bbb65ad85625f178b63cc (diff)
fix drop through wall bugHEADmain
Diffstat (limited to 'player')
-rw-r--r--player/opponent.gd2
-rw-r--r--player/player.gd2
-rw-r--r--player/player.tscn6
3 files changed, 8 insertions, 2 deletions
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")