tweak: doors unlock the collider on the up flank
This commit is contained in:
parent
efc2488dff
commit
2b949d8e73
|
|
@ -10,8 +10,4 @@ class_name SubwayTrain
|
|||
else:
|
||||
%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
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ var tween: Tween = null
|
|||
func _ready() -> void:
|
||||
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:
|
||||
playable = interaction.instantiate() as Control
|
||||
canvas_layer.add_child(playable)
|
||||
|
|
@ -38,7 +41,7 @@ func _ready() -> void:
|
|||
view.scale = Vector3.ZERO
|
||||
frame.modulate.a = 0.0
|
||||
light.visible = false
|
||||
|
||||
|
||||
Scenes.player_enable.connect(_player_active) # TODO: do I have to clean this up?
|
||||
|
||||
|
||||
|
|
@ -78,7 +81,7 @@ func expand() -> void:
|
|||
func collapse() -> void:
|
||||
if not shown: return
|
||||
shown = false
|
||||
|
||||
|
||||
if tween: tween.kill()
|
||||
tween = create_tween().set_ease(Tween.EASE_IN).set_trans(Tween.TRANS_BACK)
|
||||
tween.parallel().tween_property(view, "scale", Vector3.ZERO, 0.3)
|
||||
|
|
@ -171,10 +174,10 @@ func play_burner() -> void:
|
|||
|
||||
func interact() -> void:
|
||||
Scenes.player_enable.emit(false)
|
||||
|
||||
|
||||
|
||||
|
||||
# we must wait for our own collapse, so it doesnt change its caption while the canvas shows
|
||||
await collapse()
|
||||
await collapse()
|
||||
get_tree().call_group("interactables", "collapse")
|
||||
|
||||
if playable is StoryPlayable:
|
||||
|
|
|
|||
Loading…
Reference in New Issue