Implement platform and ship movement types; refactor player movement logic and add switching mechanism

This commit is contained in:
2025-05-25 04:30:39 +02:00
parent 60779f5b51
commit 33cab8574c
12 changed files with 215 additions and 99 deletions

View File

@@ -3,10 +3,14 @@ extends Node2D
@export var eye_left: Sprite2D
@export var eye_right: Sprite2D
@export var player_controller: PlayerController
@export var platform_movement: PlatformMovement
func _process(_delta: float) -> void:
var velocity := player_controller.last_direction
if not platform_movement:
return
var velocity := platform_movement.last_direction
if velocity.x < 0:
eye_left.frame = 1
eye_right.frame = 1