mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
added piranha plant rotation + a small optimization to playing custom levels?
This commit is contained in:
@@ -282,7 +282,8 @@ func parse_tiles() -> void:
|
||||
for i in entity_layer_nodes:
|
||||
if is_instance_valid(i) == false:
|
||||
continue
|
||||
saved_entity_layers[idx] = i.duplicate(DUPLICATE_USE_INSTANTIATION)
|
||||
if load_play == false:
|
||||
saved_entity_layers[idx] = i.duplicate(DUPLICATE_USE_INSTANTIATION)
|
||||
if i is Player:
|
||||
i.direction = 1
|
||||
i.velocity = Vector2.ZERO
|
||||
|
@@ -2,6 +2,8 @@ extends Enemy
|
||||
|
||||
@export var player_range := 24
|
||||
|
||||
@export_enum("Up", "Down", "Left", "Right") var pipe_direction := 0
|
||||
|
||||
func _enter_tree() -> void:
|
||||
$Animation.play("Hide")
|
||||
|
||||
@@ -13,5 +15,8 @@ func _ready() -> void:
|
||||
|
||||
func on_timeout() -> void:
|
||||
var player = get_tree().get_first_node_in_group("Players")
|
||||
if abs(player.global_position.x - global_position.x) >= player_range:
|
||||
$Animation.play("Rise")
|
||||
if pipe_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):
|
||||
$Animation.play("Rise")
|
||||
|
Reference in New Issue
Block a user