fixed up pipe hitboxes on smaller characters + piranha plant rotation

This commit is contained in:
JHDev2006
2025-10-01 16:16:06 +01:00
parent 8fbfbd84bf
commit 88fc0f8075
5 changed files with 49 additions and 59 deletions

View File

@@ -2,7 +2,7 @@ extends Enemy
@export var player_range := 24
@export_enum("Up", "Down", "Left", "Right") var pipe_direction := 0
@export_enum("Up", "Down", "Left", "Right") var plant_direction := 0
func _enter_tree() -> void:
$Animation.play("Hide")
@@ -15,7 +15,7 @@ func _ready() -> void:
func on_timeout() -> void:
var player = get_tree().get_first_node_in_group("Players")
if pipe_direction < 2:
if plant_direction < 2:
if abs(player.global_position.x - global_position.x) >= player_range:
$Animation.play("Rise")
elif (abs(player.global_position.y - global_position.y) >= player_range and abs(player.global_position.x - global_position.x) >= player_range * 2):