Files
aarpg/player/scripts/push_area.gd
Andriy Yednarovych e877c5f058 init
2026-02-22 19:26:26 +01:00

14 lines
355 B
GDScript

extends Area2D
func _ready() -> void:
body_entered.connect(on_body_entered)
body_exited.connect(on_body_exited)
func on_body_entered(body: Node2D) -> void:
if body is PushableStatute:
body.push_direction = PlayerManager.player.direction
func on_body_exited(body: Node2D) -> void:
if body is PushableStatute:
body.push_direction = Vector2.ZERO