feat: 增加player从广场到房间互相跳转的动作逻辑
This commit is contained in:
@@ -13,9 +13,17 @@ const MOVE_SPEED = 200.0
|
||||
var last_direction := "down"
|
||||
|
||||
func _ready() -> void:
|
||||
# 检查是否有初始位置设置
|
||||
call_deferred("_check_spawn_position")
|
||||
|
||||
# 播放初始动画
|
||||
if animation_player.has_animation("idle"):
|
||||
animation_player.play("idle")
|
||||
|
||||
func _check_spawn_position() -> void:
|
||||
var spawn_pos = SceneManager.get_next_scene_position()
|
||||
if spawn_pos != null:
|
||||
global_position = spawn_pos
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
_handle_movement(delta)
|
||||
|
||||
Reference in New Issue
Block a user