tweak: doors unlock the collider on the up flank

This commit is contained in:
tiger tiger tiger 2026-01-22 01:47:15 +01:00
parent efc2488dff
commit 2b949d8e73
2 changed files with 9 additions and 10 deletions

View File

@ -10,8 +10,4 @@ class_name SubwayTrain
else: else:
%TrainModel/AnimationPlayer.play("door_close") %TrainModel/AnimationPlayer.play("door_close")
func _ready() -> void:
%TrainModel/AnimationPlayer.animation_finished.connect(_on_animation_finished)
func _on_animation_finished(_discard) -> void:
%FrontWallClosed.disabled = door_open %FrontWallClosed.disabled = door_open

View File

@ -31,6 +31,9 @@ var tween: Tween = null
func _ready() -> void: func _ready() -> void:
assert(note and frame and canvas_layer, "Interactable must have views and frame attached") assert(note and frame and canvas_layer, "Interactable must have views and frame attached")
# how did this ever work?
await get_tree().process_frame
if interaction: if interaction:
playable = interaction.instantiate() as Control playable = interaction.instantiate() as Control
canvas_layer.add_child(playable) canvas_layer.add_child(playable)