Compare commits
3 Commits
c19b395d98
...
f0ad263e57
| Author | SHA1 | Date |
|---|---|---|
|
|
f0ad263e57 | |
|
|
23d2d3bb9e | |
|
|
cd42b64d1c |
Binary file not shown.
|
|
@ -9,12 +9,11 @@ func _ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
super.start_room()
|
await 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,4 +2,7 @@ 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): if visible and body is PlayerController: State.room.proceed.emit(Main.adulthood_room_path))
|
%PlayerDetect.body_entered.connect(func(body):
|
||||||
|
if visible and body is PlayerController:
|
||||||
|
await Main.curtain.black()
|
||||||
|
State.room.proceed.emit(Main.adulthood_room_path))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
%PlayerDetect.body_entered.connect(func(body): if visible and body is PlayerController: State.room.proceed.emit(Main.adulthood_room_path))
|
%PlayerDetect.body_entered.connect(func(body):
|
||||||
|
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,12 +27,13 @@ func get_ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
super.start_room()
|
await 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=0
|
compress/mode=2
|
||||||
|
|
|
||||||
|
|
@ -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=0
|
compress/mode=2
|
||||||
|
|
|
||||||
|
|
@ -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=0
|
compress/mode=2
|
||||||
|
|
|
||||||
|
|
@ -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=0
|
compress/mode=2
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ func _ready() -> void:
|
||||||
|
|
||||||
|
|
||||||
func start_room():
|
func start_room():
|
||||||
super.start_room()
|
await super.start_room()
|
||||||
|
|
||||||
%UI.show()
|
%UI.show()
|
||||||
|
|
||||||
|
|
@ -28,13 +28,12 @@ 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
|
||||||
|
|
@ -63,8 +62,6 @@ 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
|
||||||
|
|
@ -102,3 +99,7 @@ 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,6 +817,7 @@ 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,11 +8,21 @@ func _ready() -> void:
|
||||||
Scenes.scene_finished.connect(_on_scene_finished)
|
Scenes.scene_finished.connect(_on_scene_finished)
|
||||||
|
|
||||||
func start_soundtrack():
|
func start_soundtrack():
|
||||||
$Moving.play(70)
|
_fade_in($Moving)
|
||||||
$Childhood.play(70)
|
_fade_in($Childhood,)
|
||||||
$VoiceTraining.play(70)
|
_fade_in($VoiceTraining)
|
||||||
|
|
||||||
|
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()
|
||||||
|
|
@ -25,6 +35,7 @@ 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])
|
||||||
|
|
@ -34,9 +45,12 @@ 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, "--------------")
|
||||||
Main.curtain.open()
|
await get_tree().process_frame # so this registers as a coroutine in IDE
|
||||||
|
|
||||||
|
|
||||||
func pull_save_state(_save: SaveGame) -> void:
|
func pull_save_state(_save: SaveGame) -> void:
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ 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
|
||||||
|
|
||||||
|
|
@ -29,7 +28,6 @@ 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
|
||||||
|
|
@ -179,6 +177,7 @@ 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:
|
||||||
|
|
@ -222,5 +221,7 @@ func _on_text_finished():
|
||||||
if not animation_complete:
|
if not animation_complete:
|
||||||
text_finished.emit()
|
text_finished.emit()
|
||||||
|
|
||||||
func _emit_thunder():
|
|
||||||
emit_thunder.emit()
|
func _emit_thunder() -> void:
|
||||||
|
if State.room is YouthRoom: State.room.play_thunder()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue