ugly hotfixes for the transition scene
This commit is contained in:
parent
043b85822e
commit
a2d57969ae
|
|
@ -4,12 +4,17 @@ extends RoomTemplate
|
|||
@export var all_lines: Dictionary[TrainLine.id, TrainLine]
|
||||
|
||||
func _ready() -> void:
|
||||
id = State.rooms.TRANSITION
|
||||
%LeftDetection.body_entered.connect(on_left_train_enter)
|
||||
%RightDetection.body_entered.connect(on_right_train_enter)
|
||||
%LeftDetection.body_exited.connect(on_left_train_exit)
|
||||
%RightDetection.body_exited.connect(on_right_train_exit)
|
||||
%burnout_station.leave_room.connect(func():
|
||||
pull_save_state(save_game)
|
||||
get_parent().load_save(save_game))
|
||||
|
||||
func start_room():
|
||||
save_game = State.active_save_game
|
||||
State.pass_stage_to(%PlayerController)
|
||||
on_first_station()
|
||||
|
||||
|
|
@ -39,10 +44,16 @@ func on_third_transition():
|
|||
%StationPlayer.play("third_transition")
|
||||
|
||||
func pull_save_state(save: SaveGame) -> void:
|
||||
#FIXME
|
||||
save.sequences_enabled = Scenes.enabled_sequences
|
||||
save.current_room = State.rooms.ADULTHOOD
|
||||
save_game = save
|
||||
|
||||
func prepare_transition():
|
||||
pass
|
||||
for child in %Stations.get_children():
|
||||
if child is Node3D:
|
||||
if not child.name == "burnout_station":
|
||||
child.queue_free()
|
||||
|
||||
func unload():
|
||||
pass
|
||||
|
|
@ -93,7 +104,12 @@ func on_left_train_enter(_body):
|
|||
await get_tree().create_timer(5.0).timeout
|
||||
%Train2.get_child(0).door_open = true
|
||||
|
||||
var on_final: bool = false
|
||||
var on_final: bool = false:
|
||||
set(final):
|
||||
#FIXME: this needs to be a proper sequence!
|
||||
on_final = final
|
||||
await get_tree().create_timer(0.5).timeout
|
||||
if final: prepare_transition()
|
||||
var on_direct_path: bool = false
|
||||
func on_right_train_enter(_body):
|
||||
if not left_first_station:
|
||||
|
|
|
|||
Loading…
Reference in New Issue