fix #158 by modifying sequence handling, enhance music transitions, add thunder in jui jitsu
This commit is contained in:
parent
c49680e80d
commit
f0a8bc9437
|
|
@ -4,6 +4,7 @@ extends CenterContainer
|
||||||
signal text_finished
|
signal text_finished
|
||||||
signal finished
|
signal finished
|
||||||
signal intro
|
signal intro
|
||||||
|
signal emit_thunder
|
||||||
|
|
||||||
#TODO properly implement animation taking stage, as it should do, disabling processing when it does not have stage.
|
#TODO properly implement animation taking stage, as it should do, disabling processing when it does not have stage.
|
||||||
|
|
||||||
|
|
@ -94,7 +95,7 @@ func _ready() -> void:
|
||||||
progress = progress
|
progress = progress
|
||||||
|
|
||||||
func try_scroll():
|
func try_scroll():
|
||||||
var scroll_target: int
|
var forward_target: int
|
||||||
|
|
||||||
#print( "max lines: " + str(max_lines))
|
#print( "max lines: " + str(max_lines))
|
||||||
#print( "current lines: " + str(label.get_character_line(label.visible_characters)))
|
#print( "current lines: " + str(label.get_character_line(label.visible_characters)))
|
||||||
|
|
@ -105,13 +106,13 @@ func try_scroll():
|
||||||
|
|
||||||
if label.size.y * visible_ratio + scroll_container.scroll_vertical > scroll_container.size.y * 0.9:
|
if label.size.y * visible_ratio + scroll_container.scroll_vertical > scroll_container.size.y * 0.9:
|
||||||
if scroll_container.scroll_vertical + scroll_container.size.y * 0.9 < label.size.y:
|
if scroll_container.scroll_vertical + scroll_container.size.y * 0.9 < label.size.y:
|
||||||
scroll_target = scroll_container.scroll_vertical + scroll_container.size.y * 0.8
|
forward_target = scroll_container.scroll_vertical + scroll_container.size.y * 0.8
|
||||||
else:
|
else:
|
||||||
scroll_target = label.size.y - scroll_container.size.y
|
forward_target = label.size.y - scroll_container.size.y
|
||||||
if scroll_target != null:
|
if scroll_target != null:
|
||||||
var tween: Tween = get_tree().create_tween()
|
var tween: Tween = get_tree().create_tween()
|
||||||
##tween.set_trans()
|
##tween.set_trans()
|
||||||
tween.tween_property(scroll_container, "scroll_vertical", scroll_target, 0.5)
|
scroll_target = forward_target
|
||||||
|
|
||||||
func play_scene():
|
func play_scene():
|
||||||
animation_complete = false
|
animation_complete = false
|
||||||
|
|
@ -175,7 +176,14 @@ func skip_text():
|
||||||
animation_player.stop(true)
|
animation_player.stop(true)
|
||||||
was_skipped = true
|
was_skipped = true
|
||||||
text_finished.emit()
|
text_finished.emit()
|
||||||
|
if name == "draven":
|
||||||
|
$AnimationPlayer/Music.stop()
|
||||||
|
elif name == "JuiJutsu":
|
||||||
|
_emit_thunder()
|
||||||
|
|
||||||
func _on_text_finished():
|
func _on_text_finished():
|
||||||
if not animation_complete:
|
if not animation_complete:
|
||||||
text_finished.emit()
|
text_finished.emit()
|
||||||
|
|
||||||
|
func _emit_thunder():
|
||||||
|
emit_thunder.emit()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=113 format=4 uid="uid://b3b0gyvklqn50"]
|
[gd_scene load_steps=112 format=4 uid="uid://b3b0gyvklqn50"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://belkrno67sft0" path="res://base-environments/youth_room/room_handle.gd" id="1_aitp0"]
|
[ext_resource type="Script" uid="uid://belkrno67sft0" path="res://base-environments/youth_room/room_handle.gd" id="1_aitp0"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c0i4ydmxtxfho" path="res://base-environments/youth_room/import/youth_room.glb" id="1_jf3oi"]
|
[ext_resource type="PackedScene" uid="uid://c0i4ydmxtxfho" path="res://base-environments/youth_room/import/youth_room.glb" id="1_jf3oi"]
|
||||||
|
|
@ -356,10 +356,22 @@ tracks/16/keys = {
|
||||||
"update": 1,
|
"update": 1,
|
||||||
"values": [false]
|
"values": [false]
|
||||||
}
|
}
|
||||||
|
tracks/17/type = "value"
|
||||||
|
tracks/17/imported = false
|
||||||
|
tracks/17/enabled = true
|
||||||
|
tracks/17/path = NodePath("%ScenePlayer/Moving:volume_db")
|
||||||
|
tracks/17/interp = 1
|
||||||
|
tracks/17/loop_wrap = true
|
||||||
|
tracks/17/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [0.0]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_ea6x8"]
|
[sub_resource type="Animation" id="Animation_ea6x8"]
|
||||||
resource_name = "childhood_music"
|
resource_name = "childhood_music"
|
||||||
length = 90.0
|
length = 5.0
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
|
|
@ -367,10 +379,10 @@ tracks/0/path = NodePath("%ScenePlayer/Moving:volume_db")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"times": PackedFloat32Array(-0.0416667, 4.95833, 85, 90),
|
"times": PackedFloat32Array(-0.0416667, 5),
|
||||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
"transitions": PackedFloat32Array(3.36358, 1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [0.0, -80.0, -80.0, 0.0]
|
"values": [0.0, -80.0]
|
||||||
}
|
}
|
||||||
tracks/1/type = "value"
|
tracks/1/type = "value"
|
||||||
tracks/1/imported = false
|
tracks/1/imported = false
|
||||||
|
|
@ -379,15 +391,15 @@ tracks/1/path = NodePath("%ScenePlayer/Childhood:volume_db")
|
||||||
tracks/1/interp = 1
|
tracks/1/interp = 1
|
||||||
tracks/1/loop_wrap = true
|
tracks/1/loop_wrap = true
|
||||||
tracks/1/keys = {
|
tracks/1/keys = {
|
||||||
"times": PackedFloat32Array(0, 5, 85, 90),
|
"times": PackedFloat32Array(0, 5),
|
||||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
"transitions": PackedFloat32Array(0.196146, 1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [-80.0, 0.0, 0.0, -80.0]
|
"values": [-80.0, 0.0]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_1kp3w"]
|
[sub_resource type="Animation" id="Animation_1kp3w"]
|
||||||
resource_name = "draeven"
|
resource_name = "draeven"
|
||||||
length = 155.0
|
length = 160.0
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
|
|
@ -503,11 +515,25 @@ tracks/9/path = NodePath("ScenePlayer/Moving:volume_db")
|
||||||
tracks/9/interp = 1
|
tracks/9/interp = 1
|
||||||
tracks/9/loop_wrap = true
|
tracks/9/loop_wrap = true
|
||||||
tracks/9/keys = {
|
tracks/9/keys = {
|
||||||
"times": PackedFloat32Array(0.1, 7.6, 150.5, 158.3),
|
"times": PackedFloat32Array(0.1, 7.6, 143.233, 151.033),
|
||||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [0.0, -80.0, -80.0, 0.0]
|
"values": [0.0, -80.0, -80.0, 0.0]
|
||||||
}
|
}
|
||||||
|
tracks/10/type = "method"
|
||||||
|
tracks/10/imported = false
|
||||||
|
tracks/10/enabled = true
|
||||||
|
tracks/10/path = NodePath("%ScenePlayer")
|
||||||
|
tracks/10/interp = 1
|
||||||
|
tracks/10/loop_wrap = true
|
||||||
|
tracks/10/keys = {
|
||||||
|
"times": PackedFloat32Array(142.333),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"values": [{
|
||||||
|
"args": [],
|
||||||
|
"method": &"start_soundtrack"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_1pmhi"]
|
[sub_resource type="Animation" id="Animation_1pmhi"]
|
||||||
resource_name = "intro"
|
resource_name = "intro"
|
||||||
|
|
@ -531,7 +557,7 @@ tracks/1/path = NodePath("ScenePlayer")
|
||||||
tracks/1/interp = 1
|
tracks/1/interp = 1
|
||||||
tracks/1/loop_wrap = true
|
tracks/1/loop_wrap = true
|
||||||
tracks/1/keys = {
|
tracks/1/keys = {
|
||||||
"times": PackedFloat32Array(0.8),
|
"times": PackedFloat32Array(0),
|
||||||
"transitions": PackedFloat32Array(1),
|
"transitions": PackedFloat32Array(1),
|
||||||
"values": [{
|
"values": [{
|
||||||
"args": [],
|
"args": [],
|
||||||
|
|
@ -637,7 +663,7 @@ tracks/0/path = NodePath("ScenePlayer/Moving:volume_db")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"times": PackedFloat32Array(0, 9, 171.8, 207.7),
|
"times": PackedFloat32Array(0, 9, 177, 191),
|
||||||
"transitions": PackedFloat32Array(1.93187, 1, 0.189465, 1.93187),
|
"transitions": PackedFloat32Array(1.93187, 1, 0.189465, 1.93187),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [0.0, -80.0, -80.0, 0.0]
|
"values": [0.0, -80.0, -80.0, 0.0]
|
||||||
|
|
@ -702,7 +728,7 @@ tracks/3/keys = {
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_8gaqi"]
|
[sub_resource type="Animation" id="Animation_8gaqi"]
|
||||||
resource_name = "voice_intro"
|
resource_name = "voice_intro"
|
||||||
length = 10.0
|
length = 5.0
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
|
|
@ -710,7 +736,7 @@ tracks/0/path = NodePath("ScenePlayer/Moving:volume_db")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"times": PackedFloat32Array(0, 9),
|
"times": PackedFloat32Array(0, 5),
|
||||||
"transitions": PackedFloat32Array(1.93187, 1),
|
"transitions": PackedFloat32Array(1.93187, 1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [0.0, -80.0]
|
"values": [0.0, -80.0]
|
||||||
|
|
@ -722,7 +748,7 @@ tracks/1/path = NodePath("ScenePlayer/VoiceTraining:volume_db")
|
||||||
tracks/1/interp = 1
|
tracks/1/interp = 1
|
||||||
tracks/1/loop_wrap = true
|
tracks/1/loop_wrap = true
|
||||||
tracks/1/keys = {
|
tracks/1/keys = {
|
||||||
"times": PackedFloat32Array(0, 9.1),
|
"times": PackedFloat32Array(0, 5),
|
||||||
"transitions": PackedFloat32Array(0.241484, 1),
|
"transitions": PackedFloat32Array(0.241484, 1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [-80.0, 0.0]
|
"values": [-80.0, 0.0]
|
||||||
|
|
@ -730,7 +756,7 @@ tracks/1/keys = {
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_ghmim"]
|
[sub_resource type="Animation" id="Animation_ghmim"]
|
||||||
resource_name = "voice_music"
|
resource_name = "voice_music"
|
||||||
length = 105.0
|
length = 7.0
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/imported = false
|
tracks/0/imported = false
|
||||||
tracks/0/enabled = true
|
tracks/0/enabled = true
|
||||||
|
|
@ -738,10 +764,10 @@ tracks/0/path = NodePath("ScenePlayer/Moving:volume_db")
|
||||||
tracks/0/interp = 1
|
tracks/0/interp = 1
|
||||||
tracks/0/loop_wrap = true
|
tracks/0/loop_wrap = true
|
||||||
tracks/0/keys = {
|
tracks/0/keys = {
|
||||||
"times": PackedFloat32Array(0, 5.6, 94.8, 102.9),
|
"times": PackedFloat32Array(0, 7),
|
||||||
"transitions": PackedFloat32Array(1.93187, 1, 0.189465, 1.93187),
|
"transitions": PackedFloat32Array(4.14105, 1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [0.0, -80.0, -80.0, 0.0]
|
"values": [0.0, -80.0]
|
||||||
}
|
}
|
||||||
tracks/1/type = "value"
|
tracks/1/type = "value"
|
||||||
tracks/1/imported = false
|
tracks/1/imported = false
|
||||||
|
|
@ -750,10 +776,10 @@ tracks/1/path = NodePath("ScenePlayer/VoiceTraining:volume_db")
|
||||||
tracks/1/interp = 1
|
tracks/1/interp = 1
|
||||||
tracks/1/loop_wrap = true
|
tracks/1/loop_wrap = true
|
||||||
tracks/1/keys = {
|
tracks/1/keys = {
|
||||||
"times": PackedFloat32Array(0.1, 5.7, 94.8, 103.1),
|
"times": PackedFloat32Array(0.1, 7),
|
||||||
"transitions": PackedFloat32Array(0.176777, 1, 1.93187, 0.176777),
|
"transitions": PackedFloat32Array(0.176777, 1),
|
||||||
"update": 0,
|
"update": 0,
|
||||||
"values": [-80.0, 0.0, 0.0, -80.0]
|
"values": [-80.0, 0.0]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ilekd"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ilekd"]
|
||||||
|
|
@ -810,7 +836,6 @@ func play_scene(id: int, repeat = false):
|
||||||
Scenes.id.YOUTH_DRAEVEN:
|
Scenes.id.YOUTH_DRAEVEN:
|
||||||
play(\"draeven\")
|
play(\"draeven\")
|
||||||
$draven.play_scene()
|
$draven.play_scene()
|
||||||
get_parent().get_parent().dnd = true
|
|
||||||
|
|
||||||
func _on_ini_room():
|
func _on_ini_room():
|
||||||
pass
|
pass
|
||||||
|
|
@ -826,16 +851,24 @@ func on_voice_training_done():
|
||||||
func on_jui_jutsu_done():
|
func on_jui_jutsu_done():
|
||||||
Scenes.continue_sequence(self)
|
Scenes.continue_sequence(self)
|
||||||
$JuiJutsu.hide()
|
$JuiJutsu.hide()
|
||||||
|
if $JuiJutsu.was_skipped:
|
||||||
|
play(\"intro\")
|
||||||
|
|
||||||
func on_draeven_done():
|
func on_draeven_done():
|
||||||
Scenes.continue_sequence(self)
|
Scenes.continue_sequence(self)
|
||||||
|
await $draven.finished
|
||||||
$draven.hide()
|
$draven.hide()
|
||||||
|
|
||||||
func try_intro():
|
func try_intro():
|
||||||
if $draven.was_skipped:
|
if $draven.was_skipped:
|
||||||
play(\"intro\")
|
play(\"intro\")
|
||||||
|
|
||||||
func scene_finished(_id: int, _repeat: bool):
|
func scene_finished(id: Scenes.id, _repeat: bool):
|
||||||
|
match id:
|
||||||
|
Scenes.id.YOUTH_CHILDHOOD:
|
||||||
|
play_backwards(\"childhood_music\")
|
||||||
|
Scenes.id.YOUTH_VOICE_TRAINING:
|
||||||
|
play_backwards(\"voice_music\")
|
||||||
queue(\"RESET\")
|
queue(\"RESET\")
|
||||||
|
|
||||||
func play(anin_name: StringName = \"\", a: float = -1, b: float = 1, c: bool = false) -> void:
|
func play(anin_name: StringName = \"\", a: float = -1, b: float = 1, c: bool = false) -> void:
|
||||||
|
|
@ -1064,15 +1097,6 @@ _data = {
|
||||||
&"lighting_and_thunder": SubResource("Animation_3ms6b")
|
&"lighting_and_thunder": SubResource("Animation_3ms6b")
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="GDScript" id="GDScript_j63gy"]
|
|
||||||
script/source = "extends AnimationPlayer
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
|
||||||
if Input.is_action_just_pressed(\"ui_focus_next\"):
|
|
||||||
stop()
|
|
||||||
play(\"lighting_and_thunder\")
|
|
||||||
"
|
|
||||||
|
|
||||||
[sub_resource type="GDScript" id="GDScript_35dmj"]
|
[sub_resource type="GDScript" id="GDScript_35dmj"]
|
||||||
script/source = "extends SpotLight3D
|
script/source = "extends SpotLight3D
|
||||||
|
|
||||||
|
|
@ -1955,7 +1979,6 @@ shape = SubResource("CapsuleShape3D_72g2i")
|
||||||
libraries = {
|
libraries = {
|
||||||
&"": SubResource("AnimationLibrary_vwrt1")
|
&"": SubResource("AnimationLibrary_vwrt1")
|
||||||
}
|
}
|
||||||
script = SubResource("GDScript_j63gy")
|
|
||||||
|
|
||||||
[node name="sfx" type="Node3D" parent="."]
|
[node name="sfx" type="Node3D" parent="."]
|
||||||
|
|
||||||
|
|
@ -1973,6 +1996,7 @@ emission_angle_filter_attenuation_db = -19.6
|
||||||
|
|
||||||
[node name="thunder" type="AudioStreamPlayer3D" parent="sfx"]
|
[node name="thunder" type="AudioStreamPlayer3D" parent="sfx"]
|
||||||
transform = Transform3D(-0.410985, -0.460061, 0.787042, -0.904759, 0.311726, -0.290238, -0.111814, -0.831367, -0.544359, -0.248397, 4.34956, 8.85405)
|
transform = Transform3D(-0.410985, -0.460061, 0.787042, -0.904759, 0.311726, -0.290238, -0.111814, -0.831367, -0.544359, -0.248397, 4.34956, 8.85405)
|
||||||
|
unit_size = 100.0
|
||||||
panning_strength = 0.3
|
panning_strength = 0.3
|
||||||
bus = &"sfx"
|
bus = &"sfx"
|
||||||
|
|
||||||
|
|
@ -2268,6 +2292,7 @@ light_array = Array[Vector3]([Vector3(-0.545, 0.915, 1.035), Vector3(-0.47, 0.85
|
||||||
[connection signal="pressed" from="logic/UI/ending_button" to="logic/UI/ending_button" method="hide"]
|
[connection signal="pressed" from="logic/UI/ending_button" to="logic/UI/ending_button" method="hide"]
|
||||||
[connection signal="pressed" from="logic/UI/ending_button" to="logic/UI/ending" method="show"]
|
[connection signal="pressed" from="logic/UI/ending_button" to="logic/UI/ending" method="show"]
|
||||||
[connection signal="board_completed" from="logic/UI/Board" to="logic/UI/ending_button" method="show"]
|
[connection signal="board_completed" from="logic/UI/Board" to="logic/UI/ending_button" method="show"]
|
||||||
|
[connection signal="emit_thunder" from="logic/ScenePlayer/JuiJutsu" to="AnimationPlayer" method="play" binds= ["lighting_and_thunder"]]
|
||||||
[connection signal="finished" from="logic/ScenePlayer/draven" to="logic/ScenePlayer" method="on_draeven_done"]
|
[connection signal="finished" from="logic/ScenePlayer/draven" to="logic/ScenePlayer" method="on_draeven_done"]
|
||||||
[connection signal="input_event" from="logic/MaskMemento/UiWrapper" to="logic/MaskMemento/UiWrapper" method="_on_input_event"]
|
[connection signal="input_event" from="logic/MaskMemento/UiWrapper" to="logic/MaskMemento/UiWrapper" method="_on_input_event"]
|
||||||
[connection signal="scene_skipped" from="logic/MaskMemento/UiWrapper/UiSprite/SubViewport/CollectableUi" to="logic/UI/Board" method="on_scene_skipped"]
|
[connection signal="scene_skipped" from="logic/MaskMemento/UiWrapper/UiSprite/SubViewport/CollectableUi" to="logic/UI/Board" method="on_scene_skipped"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue