Compare commits
No commits in common. "f0ad263e571c0aa261bf6eae13ec8d1acd709b94" and "c19b395d9860e6109844a56b56d6bacfc1cd88ee" have entirely different histories.
f0ad263e57
...
c19b395d98
Binary file not shown.
|
|
@ -9,11 +9,12 @@ func _ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
await super.start_room()
|
super.start_room()
|
||||||
|
|
||||||
Scenes.player_enable.emit(true)
|
Scenes.player_enable.emit(true)
|
||||||
|
|
||||||
await Main.curtain.open()
|
await Main.curtain.open()
|
||||||
|
var next_room : String = await proceed # emitted by burnout_station.gd and therapy_station.gd
|
||||||
|
await Main.curtain.black()
|
||||||
|
Main._load_room(next_room)
|
||||||
|
|
||||||
|
|
||||||
func pull_save_state(save: SaveGame) -> void:
|
func pull_save_state(save: SaveGame) -> void:
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,4 @@ extends Node3D
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
State.room.save_game.subway_burnout = true
|
State.room.save_game.subway_burnout = true
|
||||||
%PlayerDetect.body_entered.connect(func(body):
|
%PlayerDetect.body_entered.connect(func(body): if visible and body is PlayerController: State.room.proceed.emit(Main.adulthood_room_path))
|
||||||
if visible and body is PlayerController:
|
|
||||||
await Main.curtain.black()
|
|
||||||
State.room.proceed.emit(Main.adulthood_room_path))
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
%PlayerDetect.body_entered.connect(func(body):
|
%PlayerDetect.body_entered.connect(func(body): if visible and body is PlayerController: State.room.proceed.emit(Main.adulthood_room_path))
|
||||||
if visible and body is PlayerController:
|
|
||||||
State.room.save_game.subway_burnout = true
|
|
||||||
await Main.curtain.black()
|
|
||||||
State.room.proceed.emit(Main.adulthood_room_path))
|
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,12 @@ func get_ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
await super.start_room()
|
super.start_room()
|
||||||
%UI.show()
|
%UI.show()
|
||||||
|
|
||||||
%PlayerController.process_mode = Node.PROCESS_MODE_INHERIT
|
%PlayerController.process_mode = Node.PROCESS_MODE_INHERIT
|
||||||
# Give player control immediately, then open
|
# Give player control immediately, then open
|
||||||
Scenes.player_enable.emit(true)
|
Scenes.player_enable.emit(true)
|
||||||
|
|
||||||
await Main.curtain.open()
|
await Main.curtain.open()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,4 @@ edit/normalize=false
|
||||||
edit/loop_mode=2
|
edit/loop_mode=2
|
||||||
edit/loop_begin=0
|
edit/loop_begin=0
|
||||||
edit/loop_end=-1
|
edit/loop_end=-1
|
||||||
compress/mode=2
|
compress/mode=0
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,4 @@ edit/normalize=false
|
||||||
edit/loop_mode=2
|
edit/loop_mode=2
|
||||||
edit/loop_begin=0
|
edit/loop_begin=0
|
||||||
edit/loop_end=-1
|
edit/loop_end=-1
|
||||||
compress/mode=2
|
compress/mode=0
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,4 @@ edit/normalize=false
|
||||||
edit/loop_mode=2
|
edit/loop_mode=2
|
||||||
edit/loop_begin=0
|
edit/loop_begin=0
|
||||||
edit/loop_end=-1
|
edit/loop_end=-1
|
||||||
compress/mode=2
|
compress/mode=0
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,4 @@ edit/normalize=false
|
||||||
edit/loop_mode=0
|
edit/loop_mode=0
|
||||||
edit/loop_begin=0
|
edit/loop_begin=0
|
||||||
edit/loop_end=-1
|
edit/loop_end=-1
|
||||||
compress/mode=2
|
compress/mode=0
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ func _ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
await super.start_room()
|
super.start_room()
|
||||||
|
|
||||||
%UI.show()
|
%UI.show()
|
||||||
|
|
||||||
|
|
@ -28,12 +28,13 @@ func start_room():
|
||||||
await _play_intro_scene()
|
await _play_intro_scene()
|
||||||
else:
|
else:
|
||||||
%LightAnimationPlayer.lights_on()
|
%LightAnimationPlayer.lights_on()
|
||||||
%SceneAnimationPlayer.start_soundtrack()
|
|
||||||
|
|
||||||
Scenes.player_enable.emit(true)
|
Scenes.player_enable.emit(true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _play_intro_scene() -> void:
|
func _play_intro_scene() -> void:
|
||||||
# The intro scene is auto-played, not triggered by CollectableUi
|
# The intro scene is auto-played, not triggered by CollectableUi
|
||||||
var intro: Interactable = $logic/CeilingInteractable
|
var intro: Interactable = $logic/CeilingInteractable
|
||||||
|
|
@ -62,6 +63,8 @@ func get_ready():
|
||||||
$sfx/distant_rain.play()
|
$sfx/distant_rain.play()
|
||||||
$"sfx/rain on window".play()
|
$"sfx/rain on window".play()
|
||||||
|
|
||||||
|
await get_tree().process_frame
|
||||||
|
|
||||||
|
|
||||||
func pull_save_state(save: SaveGame) -> void:
|
func pull_save_state(save: SaveGame) -> void:
|
||||||
save_game = save
|
save_game = save
|
||||||
|
|
@ -99,7 +102,3 @@ func play_chest_reveal() -> void:
|
||||||
$visuals/AnimationPlayer.play("chest_reveal")
|
$visuals/AnimationPlayer.play("chest_reveal")
|
||||||
$visuals/SecondaryAnimation.play("chest_reveal")
|
$visuals/SecondaryAnimation.play("chest_reveal")
|
||||||
await $visuals/AnimationPlayer.animation_finished
|
await $visuals/AnimationPlayer.animation_finished
|
||||||
|
|
||||||
|
|
||||||
func play_thunder() -> void:
|
|
||||||
%RoomAnimationPlayer.play("lightning_and_thunder")
|
|
||||||
|
|
|
||||||
|
|
@ -817,7 +817,6 @@ billboard = false
|
||||||
transform = Transform3D(-0.99999964, 0, -8.7422755e-08, 0, 1, 0, 8.7422755e-08, 0, -0.99999964, 0.30241805, 0.49012983, -5.9604645e-08)
|
transform = Transform3D(-0.99999964, 0, -8.7422755e-08, 0, 1, 0, 8.7422755e-08, 0, -0.99999964, 0.30241805, 0.49012983, -5.9604645e-08)
|
||||||
|
|
||||||
[node name="RoomAnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="RoomAnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
unique_name_in_owner = true
|
|
||||||
libraries = {
|
libraries = {
|
||||||
&"": ExtResource("23_corra")
|
&"": ExtResource("23_corra")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,21 +8,11 @@ func _ready() -> void:
|
||||||
Scenes.scene_finished.connect(_on_scene_finished)
|
Scenes.scene_finished.connect(_on_scene_finished)
|
||||||
|
|
||||||
func start_soundtrack():
|
func start_soundtrack():
|
||||||
_fade_in($Moving)
|
$Moving.play(70)
|
||||||
_fade_in($Childhood,)
|
$Childhood.play(70)
|
||||||
_fade_in($VoiceTraining)
|
$VoiceTraining.play(70)
|
||||||
|
|
||||||
var tween := create_tween()
|
|
||||||
tween.tween_property($Moving, "volume_db", 0, 3.0)
|
|
||||||
|
|
||||||
|
|
||||||
func _fade_in(audio_stream : AudioStreamPlayer) -> void:
|
|
||||||
if not audio_stream.playing:
|
|
||||||
audio_stream.volume_db = -80
|
|
||||||
audio_stream.play(70)
|
|
||||||
|
|
||||||
func _on_scene_starting(scene_id: Scenes.id, _repeat: bool) -> void:
|
func _on_scene_starting(scene_id: Scenes.id, _repeat: bool) -> void:
|
||||||
print_debug("YouthRoomScenePlayer._on_scene_starting(%s)" % Scenes.id.keys()[scene_id])
|
|
||||||
|
|
||||||
# Handle scene-specific music
|
# Handle scene-specific music
|
||||||
# Note: Chest animation is now handled by YouthRoom.prepare_scene_start()
|
# Note: Chest animation is now handled by YouthRoom.prepare_scene_start()
|
||||||
|
|
@ -35,7 +25,6 @@ func _on_scene_starting(scene_id: Scenes.id, _repeat: bool) -> void:
|
||||||
play("jui_jutsu_music")
|
play("jui_jutsu_music")
|
||||||
Scenes.id.YOUTH_DRAVEN:
|
Scenes.id.YOUTH_DRAVEN:
|
||||||
play("draeven")
|
play("draeven")
|
||||||
_: pass
|
|
||||||
|
|
||||||
func _on_scene_finished(scene_id: Scenes.id, _repeat: bool) -> void:
|
func _on_scene_finished(scene_id: Scenes.id, _repeat: bool) -> void:
|
||||||
print_debug("YouthRoomScenePlayer._on_scene_finished(%s)" % Scenes.id.keys()[scene_id])
|
print_debug("YouthRoomScenePlayer._on_scene_finished(%s)" % Scenes.id.keys()[scene_id])
|
||||||
|
|
@ -45,12 +34,9 @@ func _on_scene_finished(scene_id: Scenes.id, _repeat: bool) -> void:
|
||||||
play_backwards("childhood_music")
|
play_backwards("childhood_music")
|
||||||
Scenes.id.YOUTH_VOICE_TRAINING:
|
Scenes.id.YOUTH_VOICE_TRAINING:
|
||||||
play_backwards("voice_music")
|
play_backwards("voice_music")
|
||||||
Scenes.id.YOUTH_JUI_JUTSU:
|
|
||||||
play_backwards("jui_jutsu_music")
|
|
||||||
|
|
||||||
queue("RESET")
|
queue("RESET")
|
||||||
|
|
||||||
|
|
||||||
func play(anim_name: StringName = "", a: float = -1, b: float = 1, c: bool = false) -> void:
|
func play(anim_name: StringName = "", a: float = -1, b: float = 1, c: bool = false) -> void:
|
||||||
print_debug("YouthRoomScenePlayer.play(%s)" % anim_name)
|
print_debug("YouthRoomScenePlayer.play(%s)" % anim_name)
|
||||||
super.play(anim_name, a, b, c)
|
super.play(anim_name, a, b, c)
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ func play() -> String:
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
prints("----------", "START_ROOM", self.name, "--------------")
|
prints("----------", "START_ROOM", self.name, "--------------")
|
||||||
await get_tree().process_frame # so this registers as a coroutine in IDE
|
Main.curtain.open()
|
||||||
|
|
||||||
|
|
||||||
func pull_save_state(_save: SaveGame) -> void:
|
func pull_save_state(_save: SaveGame) -> void:
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ extends Playable
|
||||||
signal text_finished
|
signal text_finished
|
||||||
signal finished
|
signal finished
|
||||||
signal intro
|
signal intro
|
||||||
|
signal emit_thunder
|
||||||
|
|
||||||
@export var scene_id : Scenes.id
|
@export var scene_id : Scenes.id
|
||||||
|
|
||||||
|
|
@ -28,6 +29,7 @@ var progress: float = 0:
|
||||||
elif progress > 0:
|
elif progress > 0:
|
||||||
for i in range(min(progress, substring_sizes.size()-1) as int) if progress > 0 else range(substring_sizes.size()-1):
|
for i in range(min(progress, substring_sizes.size()-1) as int) if progress > 0 else range(substring_sizes.size()-1):
|
||||||
start_index += substring_sizes[i]
|
start_index += substring_sizes[i]
|
||||||
|
|
||||||
label.visible_characters = start_index + int(substring_sizes[min(progress as int, substring_sizes.size()-1)] * fmod(progress, 1))
|
label.visible_characters = start_index + int(substring_sizes[min(progress as int, substring_sizes.size()-1)] * fmod(progress, 1))
|
||||||
else:
|
else:
|
||||||
label.visible_ratio = 0
|
label.visible_ratio = 0
|
||||||
|
|
@ -177,7 +179,6 @@ func play():
|
||||||
|
|
||||||
finished.emit()
|
finished.emit()
|
||||||
|
|
||||||
|
|
||||||
func _unhandled_input(event: InputEvent) -> void:
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
var just_revealed_text := false
|
var just_revealed_text := false
|
||||||
if event is InputEventMouseButton:
|
if event is InputEventMouseButton:
|
||||||
|
|
@ -221,7 +222,5 @@ func _on_text_finished():
|
||||||
if not animation_complete:
|
if not animation_complete:
|
||||||
text_finished.emit()
|
text_finished.emit()
|
||||||
|
|
||||||
|
func _emit_thunder():
|
||||||
func _emit_thunder() -> void:
|
emit_thunder.emit()
|
||||||
if State.room is YouthRoom: State.room.play_thunder()
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue