This commit is contained in:
Andriy Yednarovych
2026-02-22 19:26:26 +01:00
parent fd1ff19c4c
commit e877c5f058
211 changed files with 9385 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
class_name PlayerInteractionsHost extends Node2D
@onready var player: Player = $".."
func _ready() -> void:
player.direction_change.connect(update_direction)
func update_direction(new_direction: Vector2) -> void:
match new_direction:
Vector2.DOWN:
rotation_degrees = 0
Vector2.UP:
rotation_degrees = 180
Vector2.LEFT:
rotation_degrees = 90
Vector2.RIGHT:
rotation_degrees = 270
_:
rotation_degrees = 0