Merge branch 'master' of git.touhou.dev:StellatedCUBE/Jam10

This commit is contained in:
gemdude46 2023-01-30 08:58:13 +00:00
commit 09c9809e94
17 changed files with 3823 additions and 30 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,10 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://Fonts/squares/Squares Bold Free.otf" type="DynamicFontData" id=1]
[resource]
size = 24
outline_size = 3
outline_color = Color( 0.0431373, 0.368627, 0.396078, 1 )
extra_spacing_char = 4
font_data = ExtResource( 1 )

View File

@ -0,0 +1,9 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://Fonts/squares/Squares Bold Free.otf" type="DynamicFontData" id=1]
[resource]
outline_size = 2
outline_color = Color( 0, 0, 0, 1 )
extra_spacing_char = 4
font_data = ExtResource( 1 )

View File

@ -181,7 +181,6 @@ anims/InitialFade = SubResource( 1 )
anims/RESET = SubResource( 2 )
[node name="ColorRect" type="ColorRect" parent="."]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 1 )

View File

@ -1,4 +1,8 @@
<<<<<<< HEAD
[gd_scene load_steps=17 format=2]
=======
[gd_scene load_steps=18 format=2]
>>>>>>> e02aaa26c207234404f2d1f585dca170392fddfe
[ext_resource path="res://Tile Sets/SnowySlopes.tres" type="TileSet" id=1]
[ext_resource path="res://Units/DownhillAutoscrollerPlayer.tscn" type="PackedScene" id=2]
@ -11,8 +15,9 @@
[ext_resource path="res://Sounds/sfx_jump_07-80241.mp3" type="AudioStream" id=9]
[ext_resource path="res://Sounds/land2-43790.mp3" type="AudioStream" id=10]
[ext_resource path="res://Sounds/ski-67717.wav" type="AudioStream" id=11]
[ext_resource path="res://Scripts/Units/FollowReplay.gd" type="Script" id=12]
[ext_resource path="res://Scripts/PlayerRecorder.gd" type="Script" id=13]
[ext_resource path="res://Fonts/squares/squares.tres" type="DynamicFont" id=12]
[ext_resource path="res://Scripts/InGameUI.gd" type="Script" id=13]
[ext_resource path="res://Fonts/squares/squares_big.tres" type="DynamicFont" id=14]
[sub_resource type="Animation" id=3]
resource_name = "InitialFade"
@ -82,7 +87,10 @@ __meta__ = {
"_edit_vertical_guides_": [ 2134.0, 3833.0 ]
}
tile_set_name = "SnowySlopes"
camera_h_offset = 2.5
finish_x_pos = 354
target_time = 60.0
defeat_cutscene = "LostRace1"
victory_cutscene = "Cutscene2"
spawning = {
Vector2( 45, -6 ): "CIRNO",
Vector2( 80, -7 ): "SANAE",
@ -115,6 +123,7 @@ position = Vector2( 91, -197 )
[node name="Camera2D" type="Camera2D" parent="Player"]
offset = Vector2( 0, -15 )
smoothing_speed = 7.0
[node name="PlayerRecorder" type="Node" parent="Player"]
script = ExtResource( 13 )
@ -128,12 +137,45 @@ script = ExtResource( 12 )
unit_type = 0
[node name="CanvasLayer" type="CanvasLayer" parent="."]
script = ExtResource( 13 )
[node name="Speedometer" type="RichTextLabel" parent="CanvasLayer"]
margin_left = 20.0
margin_top = 20.0
margin_right = 170.0
margin_bottom = 80.0
custom_colors/default_color = Color( 0.560784, 0.972549, 0.886275, 1 )
custom_fonts/normal_font = ExtResource( 14 )
text = "+00 MPH"
fit_content_height = true
scroll_active = false
[node name="Timer" type="RichTextLabel" parent="CanvasLayer"]
margin_left = 870.0
margin_top = 20.0
margin_right = 1020.0
margin_bottom = 80.0
custom_colors/default_color = Color( 0.560784, 0.972549, 0.886275, 1 )
custom_fonts/normal_font = ExtResource( 14 )
text = "+00 MPH"
fit_content_height = true
scroll_active = false
[node name="BoostLabel" type="RichTextLabel" parent="CanvasLayer"]
margin_left = 150.0
margin_top = 150.0
margin_right = 300.0
margin_bottom = 180.0
custom_fonts/normal_font = ExtResource( 12 )
text = "+00 MPH"
fit_content_height = true
scroll_active = false
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
modulate = Color( 1, 1, 1, 0 )
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0.12549, 0.231373, 0.2, 1 )
color = Color( 0, 0, 0, 1 )
[node name="PitTransitionPlayer" type="AnimationPlayer" parent="CanvasLayer/ColorRect"]
anims/InitialFade = SubResource( 3 )

178
Scenes/LostRace1.tscn Normal file
View File

@ -0,0 +1,178 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://Fonts/luckiest-guy/luckiest-guy.tres" type="DynamicFont" id=1]
[ext_resource path="res://Scripts/CutsceneRunner.gd" type="Script" id=2]
[ext_resource path="res://Sounds/Beep.wav" type="AudioStream" id=3]
[ext_resource path="res://Graphics/UI/DialogueBox.png" type="Texture" id=5]
[sub_resource type="Animation" id=3]
resource_name = "DialogueFade"
length = 2.0
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.7, 0.701, 1.2, 2 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "method"
tracks/1/path = NodePath("..")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.7, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [ ],
"method": "mid_dialogue_fade"
}, {
"args": [ ],
"method": "dialogue_fade_done"
} ]
}
[sub_resource type="Animation" id=4]
resource_name = "FinalFade"
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath("../ColorRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "method"
tracks/1/path = NodePath("..")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 1.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "final_fade_done"
} ]
}
[sub_resource type="Animation" id=1]
resource_name = "InitialFade"
length = 2.25
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 1.5, 2.2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../ColorRect:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 1.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
tracks/2/type = "method"
tracks/2/path = NodePath("..")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 2.2 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "dialogue_fade_done"
} ]
}
[sub_resource type="Animation" id=2]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../ColorRect:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ) ]
}
[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
cutscene_name = "LostRace"
next_scene_to_load = "DownhillAutoscroller"
[node name="DialogueBox" type="TextureRect" parent="."]
modulate = Color( 1, 1, 1, 0 )
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = -120.0
texture = ExtResource( 5 )
[node name="RichTextLabel" type="RichTextLabel" parent="DialogueBox"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 24.0
margin_top = 12.0
margin_right = -24.0
margin_bottom = -12.0
custom_colors/default_color = Color( 0.196078, 0.2, 0.32549, 1 )
custom_fonts/normal_font = ExtResource( 1 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="DialogueBox"]
anims/DialogueFade = SubResource( 3 )
anims/FinalFade = SubResource( 4 )
anims/InitialFade = SubResource( 1 )
anims/RESET = SubResource( 2 )
[node name="ColorRect" type="ColorRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 1 )
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
volume_db = -10.0

178
Scenes/LostRace2.tscn Normal file
View File

@ -0,0 +1,178 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://Fonts/luckiest-guy/luckiest-guy.tres" type="DynamicFont" id=1]
[ext_resource path="res://Scripts/CutsceneRunner.gd" type="Script" id=2]
[ext_resource path="res://Sounds/Beep.wav" type="AudioStream" id=3]
[ext_resource path="res://Graphics/UI/DialogueBox.png" type="Texture" id=5]
[sub_resource type="Animation" id=3]
resource_name = "DialogueFade"
length = 2.0
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.7, 0.701, 1.2, 2 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "method"
tracks/1/path = NodePath("..")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.7, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [ ],
"method": "mid_dialogue_fade"
}, {
"args": [ ],
"method": "dialogue_fade_done"
} ]
}
[sub_resource type="Animation" id=4]
resource_name = "FinalFade"
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath("../ColorRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "method"
tracks/1/path = NodePath("..")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 1.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "final_fade_done"
} ]
}
[sub_resource type="Animation" id=1]
resource_name = "InitialFade"
length = 2.25
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 1.5, 2.2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../ColorRect:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 1.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
tracks/2/type = "method"
tracks/2/path = NodePath("..")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 2.2 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "dialogue_fade_done"
} ]
}
[sub_resource type="Animation" id=2]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../ColorRect:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ) ]
}
[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
cutscene_name = "LostRace"
next_scene_to_load = "DownhillAutoscroller2"
[node name="DialogueBox" type="TextureRect" parent="."]
modulate = Color( 1, 1, 1, 0 )
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = -120.0
texture = ExtResource( 5 )
[node name="RichTextLabel" type="RichTextLabel" parent="DialogueBox"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 24.0
margin_top = 12.0
margin_right = -24.0
margin_bottom = -12.0
custom_colors/default_color = Color( 0.196078, 0.2, 0.32549, 1 )
custom_fonts/normal_font = ExtResource( 1 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="DialogueBox"]
anims/DialogueFade = SubResource( 3 )
anims/FinalFade = SubResource( 4 )
anims/InitialFade = SubResource( 1 )
anims/RESET = SubResource( 2 )
[node name="ColorRect" type="ColorRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 1 )
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
volume_db = -10.0

View File

@ -13,9 +13,6 @@
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="."]
margin_right = 1024.0

View File

@ -36,16 +36,11 @@ margin_right = 177.0
margin_bottom = 745.0
custom_fonts/font = ExtResource( 2 )
text = "Back"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CenterContainer" type="CenterContainer" parent="."]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = 512.0

178
Scenes/WonRace1.tscn Normal file
View File

@ -0,0 +1,178 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://Fonts/luckiest-guy/luckiest-guy.tres" type="DynamicFont" id=1]
[ext_resource path="res://Scripts/CutsceneRunner.gd" type="Script" id=2]
[ext_resource path="res://Sounds/Beep.wav" type="AudioStream" id=3]
[ext_resource path="res://Graphics/UI/DialogueBox.png" type="Texture" id=5]
[sub_resource type="Animation" id=3]
resource_name = "DialogueFade"
length = 2.0
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.7, 0.701, 1.2, 2 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "method"
tracks/1/path = NodePath("..")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.7, 2 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [ ],
"method": "mid_dialogue_fade"
}, {
"args": [ ],
"method": "dialogue_fade_done"
} ]
}
[sub_resource type="Animation" id=4]
resource_name = "FinalFade"
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath("../ColorRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "method"
tracks/1/path = NodePath("..")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 1.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "final_fade_done"
} ]
}
[sub_resource type="Animation" id=1]
resource_name = "InitialFade"
length = 2.25
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 1.5, 2.2 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../ColorRect:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 1.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
tracks/2/type = "method"
tracks/2/path = NodePath("..")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 2.2 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "dialogue_fade_done"
} ]
}
[sub_resource type="Animation" id=2]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../ColorRect:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ) ]
}
[node name="Control" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
cutscene_name = "LostRace"
next_scene_to_load = "DownhillAutoscroller2"
[node name="DialogueBox" type="TextureRect" parent="."]
modulate = Color( 1, 1, 1, 0 )
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = -120.0
texture = ExtResource( 5 )
[node name="RichTextLabel" type="RichTextLabel" parent="DialogueBox"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 24.0
margin_top = 12.0
margin_right = -24.0
margin_bottom = -12.0
custom_colors/default_color = Color( 0.196078, 0.2, 0.32549, 1 )
custom_fonts/normal_font = ExtResource( 1 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="DialogueBox"]
anims/DialogueFade = SubResource( 3 )
anims/FinalFade = SubResource( 4 )
anims/InitialFade = SubResource( 1 )
anims/RESET = SubResource( 2 )
[node name="ColorRect" type="ColorRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 1 )
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 3 )
volume_db = -10.0

View File

@ -20,23 +20,64 @@ var dialogue_fading_in : bool = true
var cutscene_directory = {
"Cutscene1": [
["Kyouko: Woooow.",
"Kyouko: I can't believe it's taken this long for them to make a stupid game about me snowboarding."],
["Kyouko is relaxing outside while neglecting her duties.",
"Aya flies across Myouren Temple while the Bunbunmaru Newspaper falls down from above and hits the ground, Kyouko notices it and picks it up."],
["Reimu: Is the dialogue completed at least?",
"Kyouko: They're still working on it.",
"Reimu: Oh. Wake me up when they're finished."],
["Kyouko: Huh, whats this?"],
["Kyouko: Gee, I hope they get the game done soon.",
"Kyouko: I really wanna go snowboarding now."],
["She unfolds the paper and reads it."],
["Kyouko: Like I reaaally wanna. Really."],
["Kyouko: A winter game competition, eh? I wonder what this is about?"],
["~~ Looking for something to do with your holiday? Then come on down to Moriya Shrine, were looking for competitors to participate for our winter festival, winners will receive a statue of the legendary Inari Okami which will grant blessing for the upcoming harvest.", "We hope to see you attend Moriyas Wanton Winter Wagor! ~~"],
["Kyouko was hesitant at first about attending the winter fest, but her boredom got the best of her and decided to journey to Moriya Shrine."],
["Kyouko: I made up my mind, I'm going to Moriya shrine to win that statue for myself!"],
["Kyouko decides to rush down to Moriya shrine to compete for the prize, despite not knowing what was in store for her.", "Kyouko arrives at Moriya Shrine, though shes a bit nervous to see a large crowd of people gather from all across Gensokyo."],
["Kyouko: This place looks crowded, Im not so sure about this…"],
["As her shyness grows, she turns her attention away from the crowd and to Sanae and Reimu, they both seem to be talking about something."],
["Reimu: So where'd ya get this statue anyway?", "Sanae: Oh, I just found it in our storage one day. Guess we had it all along, huh?", "Reimu: Huh, weird."],
["This piqued Kyoukos interest and she wondered just how valuable this statue would be if were to win it for herself, this gets her excited for the competition."],
["Kyouko: Well, I guess Ill have to do my best!"],
["As everyone in the crowd prepares for the winter games, Kyouko braces herself for whatever challenge faces her."],
],
"Cutscene2": [
["Kyouko: Ain't got nothing going on in Cutscene 2 huh."],
["After a long competition, Kyouko was rewarded with the honor of opening the present that holds the statue inside, after she opened it everyone was greeted by a surprise."],
],
"Cutscene3": [
["Kyouko: Cutscene 3 too."],
["Luna, Sunny, Star: Congratulations, youre the winner!", "Kyouko: Whaaaaaaaat?!?"],
["Kyouko was bewildered by what she had seen, it turns out this wasnt the Inari Okami but a prank!"],
["Sanae: Wait, this was all a setup?", "Sunny: Hehe, surprised?", "Star: We fooled you!", "Luna: You shouldve seen it coming!"],
["There was confusion among the crowd, Kyouko was troubled by all this."],
["Reimu: So you were the ones who set all this up!"],
["Sunny: Thats right. While everyone was busy competing for the Okami statue, we decided to hide ourselves in this present while pretending to be the statue itself!"],
["The fairies were greeted with dead silence for a brief moment until Kyouko started laughing. Reimu and Sanae looked at each other in confusion."],
["Kyouko: Bwhahaha, you got me good, I havent had this much fun in a while!"],
["The three fairies looked at each other in confusion at first, then decided to laugh all together while the crowd decided to leave.", "As the sun sets, Kyouko waves goodbye to the fairies as they part ways."],
["Kyouko: I cant wait to tell lady Byakuren about my journey once I return to Myouren Temple!"],
],
"LostRace": [
["You lost the race - try again!"],
],
"WonRace": [
["You won the race! Onto the next one!"],
],
}
@ -45,6 +86,8 @@ func _ready():
animation_player = find_node("AnimationPlayer")
audio_stream_player = find_node("AudioStreamPlayer")
animation_player.play("InitialFade")
if cutscene_name == "Cutscene2":
MusicController.play_score_end()
func advance_dialogue():
if cutscene_sub_index == cutscene_directory[cutscene_name][cutscene_index].size() - 1:
@ -69,6 +112,7 @@ func dialogue_fade_done():
dialogue_fading_in = false
func final_fade_done():
get_node("ColorRect").modulate.a = 255
get_tree().change_scene("res://Scenes/" + next_scene_to_load + ".tscn")
func _process(delta):

View File

@ -9,7 +9,12 @@ extends Node
class_name GameScene
export var tile_set_name: String
export var camera_h_offset : float = 1
export var camera_h_offset : float = 3
export var camera_v_offset : float = 1
export var finish_x_pos : int
export var target_time : float
export var defeat_cutscene : String
export var victory_cutscene : String
const Constants = preload("res://Scripts/Constants.gd")
const Unit = preload("res://Scripts/Unit.gd")
const UNIT_DIRECTORY = {
@ -22,10 +27,12 @@ export var spawning : Dictionary
var spawning_map = {} # keeps track of what's alive
var paused : bool = false
var race_over : bool = false
var units = []
var player : Player
var player_cam : Camera2D
var player_cam_easing_cum_time : float = 0
# [pressed?, just pressed?, just released?]
var input_table = {
@ -62,6 +69,7 @@ func _ready():
player.init_unit_w_scene(self)
player_cam = player.get_node("Camera2D")
player_cam.make_current()
player_cam.offset_v = camera_v_offset
units.append(get_node("Rival"))
get_node("Rival").init_unit_w_scene(self)
@ -74,7 +82,7 @@ func _ready():
find_node("PitTransitionPlayer").play("InitialFade")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
func _process(delta):
# visual effects
if (player.facing == Constants.Direction.RIGHT):
player_cam.offset_h = camera_h_offset
@ -95,7 +103,16 @@ func _process(delta):
if !stage_finished:
time_elapsed_in_race += delta
# 1 grid unit = 2ft, 1 grid unit / s = 1.36 mph
player_speed_mph = sqrt(pow(player.v_speed, 2) + pow(player.h_speed, 2)) * 1.36
player_speed_mph = player.h_speed * 1.36
if not race_over and player.pos.x >= finish_x_pos:
race_over = true
if time_elapsed_in_race > target_time:
# lost race
get_tree().change_scene("res://Scenes/" + defeat_cutscene + ".tscn")
else:
# won race
get_tree().change_scene("res://Scenes/" + victory_cutscene + ".tscn")
func read_paused():
if Input.is_action_just_pressed(Constants.INPUT_MAP[Constants.PlayerInput.GBA_START]):

55
Scripts/InGameUI.gd Normal file
View File

@ -0,0 +1,55 @@
extends CanvasLayer
const Constants = preload("res://Scripts/Constants.gd")
const FLASH_BOOST_DUR : float = 1.0
const FLASH_BOOST_CYCLE : float = 0.1
var scene : GameScene
var player : DownhillAutoscrollerPlayer
var boost_label : RichTextLabel
var flash_boost : bool
var flash_time_elapsed : float
var speedometer : RichTextLabel
var timer : RichTextLabel
# Called when the node enters the scene tree for the first time.
func _ready():
scene = get_node("/root/Scene")
player = get_node("/root/Scene/Player")
speedometer = get_node("Speedometer")
timer = get_node("Timer")
boost_label = get_node("BoostLabel")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
speedometer.text = str(floor(scene.player_speed_mph)) + " MPH"
var dec_value : int = floor((scene.time_elapsed_in_race - floor(scene.time_elapsed_in_race))
* 100)
timer.text = str(floor(scene.time_elapsed_in_race)) + ":" + str(dec_value)
if player.get_current_action() == Constants.UnitCurrentAction.SPINNING:
flash_boost = false
flash_time_elapsed = 0
boost_label.remove_color_override("default_color")
boost_label.visible = true
boost_label.text = "+" + str(floor(player.boost * 1.36)) + " MPH"
else:
if flash_boost:
boost_label.add_color_override("default_color", Color.green)
flash_time_elapsed += delta
if flash_time_elapsed > FLASH_BOOST_DUR:
flash_boost = false
else:
if int(floor(flash_time_elapsed / FLASH_BOOST_CYCLE)) % 2 == 0:
boost_label.visible = true
else:
boost_label.visible = false
else:
boost_label.visible = false

View File

@ -271,8 +271,8 @@ func check_collision(unit : Unit, collider, collision_into_directions, delta):
if unit.get_current_action() != Constants.UnitCurrentAction.JUMPING:
unit.set_unit_condition(Constants.UnitCondition.IS_ON_GROUND, true)
# landed on ground, horizontal component to become magnitude
unit.v_speed = 0
unit.landed()
unit.v_speed = 0
reangle_move(unit, collider, false)
else:
if collider[0].x == collider[1].x:

View File

@ -5,7 +5,7 @@ class_name DownhillAutoscrollerPlayer
export var min_speed : float = 3
export var max_speed : float = 11
export var player_initiated_acceleration : float = 5
export var boost_per_second : float = 6
export var boost_per_second : float = 6 / 1.36 # 6 mph
var last_contacted_map_elem_type : int = Constants.MapElemType.SQUARE
@ -200,7 +200,10 @@ func landed():
boost = 0
spin_audiostream_player.stop()
return
target_move_speed += boost
if boost > 0:
scene.find_node("CanvasLayer").flash_boost = true
h_speed += boost
target_move_speed = h_speed
boost = 0
func react(delta):

Binary file not shown.