mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
fixed up pipe hitboxes on smaller characters + piranha plant rotation
This commit is contained in:
@@ -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):
|
||||
|
Reference in New Issue
Block a user