Added Title Screen

This commit is contained in:
nwf2004 2023-01-29 20:14:42 -05:00
parent 26be80e893
commit b9602abb51
16 changed files with 293 additions and 6 deletions

Binary file not shown.

View File

@ -142,6 +142,9 @@ tracks/1/keys = {
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
script = ExtResource( 3 ) script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
cutscene_name = "Cutscene1" cutscene_name = "Cutscene1"
next_scene_to_load = "DownhillAutoscroller" next_scene_to_load = "DownhillAutoscroller"

View File

@ -105,9 +105,6 @@ tile_data = PoolIntArray( 1, 8, 0, 6, 3, 0, 65539, 9, 0, 65541, 8, 0, 65544, 3,
[node name="Player" parent="." instance=ExtResource( 2 )] [node name="Player" parent="." instance=ExtResource( 2 )]
position = Vector2( 91, -197 ) position = Vector2( 91, -197 )
__meta__ = {
"_edit_group_": true
}
[node name="Camera2D" type="Camera2D" parent="Player"] [node name="Camera2D" type="Camera2D" parent="Player"]
offset = Vector2( 0, -15 ) offset = Vector2( 0, -15 )

93
Scenes/TitleScreen.tscn Normal file
View File

@ -0,0 +1,93 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://Scenes/TitleScreen/StartGame.tscn" type="PackedScene" id=1]
[ext_resource path="res://Scenes/TitleScreen/MenuButton.tscn" type="PackedScene" id=2]
[ext_resource path="res://Scenes/TitleScreen/CreditsButton.tscn" type="PackedScene" id=3]
[ext_resource path="res://Scenes/TitleScreen/FadeIn.tscn" type="PackedScene" id=4]
[ext_resource path="res://Scenes/TitleScreen/StartGame.gd" type="Script" id=5]
[ext_resource path="res://Scenes/Title_Screen.gd" type="Script" id=6]
[node name="TitleScreen" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Menu" type="VBoxContainer" parent="."]
margin_left = 120.0
margin_top = 80.0
margin_right = 904.0
margin_bottom = 688.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Logo" type="TextureRect" parent="Menu"]
margin_right = 784.0
stretch_mode = 4
[node name="CenterRow" type="HBoxContainer" parent="Menu"]
margin_top = 4.0
margin_right = 784.0
margin_bottom = 608.0
size_flags_vertical = 3
[node name="Buttons" type="VBoxContainer" parent="Menu/CenterRow"]
margin_right = 390.0
margin_bottom = 604.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 20
alignment = 1
[node name="StartGame" parent="Menu/CenterRow/Buttons" instance=ExtResource( 1 )]
margin_top = 192.0
margin_right = 390.0
margin_bottom = 252.0
rect_min_size = Vector2( 360, 60 )
flat = false
script = ExtResource( 5 )
scene_to_load = "res://Scenes/DownhillAutoscroller.tscn"
[node name="ManualButton" parent="Menu/CenterRow/Buttons" instance=ExtResource( 2 )]
margin_top = 272.0
margin_right = 390.0
margin_bottom = 332.0
rect_min_size = Vector2( 360, 60 )
flat = false
script = ExtResource( 5 )
scene_to_load = "res://Scenes/TitleScreen/Manual.tscn"
[node name="CreditsButton" parent="Menu/CenterRow/Buttons" instance=ExtResource( 3 )]
margin_top = 352.0
margin_right = 390.0
margin_bottom = 412.0
rect_min_size = Vector2( 360, 60 )
flat = false
script = ExtResource( 5 )
scene_to_load = "res://Scenes/TitleScreen/Credits.tscn"
[node name="CenterContainer" type="CenterContainer" parent="Menu/CenterRow"]
margin_left = 394.0
margin_right = 784.0
margin_bottom = 604.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Characters" type="TextureRect" parent="Menu/CenterRow/CenterContainer"]
margin_left = 195.0
margin_top = 302.0
margin_right = 195.0
margin_bottom = 302.0
[node name="Version Label" type="Label" parent="Menu"]
visible = false
margin_top = 308.0
margin_right = 784.0
margin_bottom = 608.0
size_flags_vertical = 7
[node name="FadeIn" parent="." instance=ExtResource( 4 )]
visible = false

View File

@ -0,0 +1,16 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/TitleScreen/NewGAme.tscn" type="PackedScene" id=1]
[node name="Credits" instance=ExtResource( 1 )]
[node name="VBoxContainer" parent="CenterContainer" index="0"]
margin_left = 414.0
margin_right = 610.0
[node name="Label" parent="CenterContainer/VBoxContainer" index="0"]
margin_right = 196.0
text = "Credits"
[node name="Button" parent="CenterContainer/VBoxContainer" index="1"]
margin_right = 196.0

View File

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/TitleScreen/MenuButton.tscn" type="PackedScene" id=1]
[node name="CreditsButton" instance=ExtResource( 1 )]
[node name="Label" parent="." index="0"]
text = "Credits"

View File

@ -0,0 +1,44 @@
[gd_scene load_steps=3 format=2]
[sub_resource type="Animation" id=1]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:color")
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( 0, 0, 0, 0 ) ]
}
[sub_resource type="Animation" id=2]
resource_name = "fade_in"
step = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath(".:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 0, 0, 0, 0 ), Color( 0, 0, 0, 1 ) ]
}
[node name="FadeIn" type="ColorRect"]
anchor_right = 1.0
anchor_bottom = 1.0
color = Color( 0, 0, 0, 0 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/RESET = SubResource( 1 )
anims/fade_in = SubResource( 2 )

View File

@ -0,0 +1,16 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/TitleScreen/NewGAme.tscn" type="PackedScene" id=1]
[node name="Manual" instance=ExtResource( 1 )]
[node name="VBoxContainer" parent="CenterContainer" index="0"]
margin_left = 415.0
margin_right = 608.0
[node name="Label" parent="CenterContainer/VBoxContainer" index="0"]
margin_right = 193.0
text = "Manual"
[node name="Button" parent="CenterContainer/VBoxContainer" index="1"]
margin_right = 193.0

View File

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/TitleScreen/StartGame.tscn" type="PackedScene" id=1]
[node name="ManualButton" instance=ExtResource( 1 )]
[node name="Label" parent="." index="0"]
text = "Manual"

View File

@ -0,0 +1,43 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Scenes/TitleScreen/new_dynamicfont.tres" type="DynamicFont" id=1]
[ext_resource path="res://Scenes/TitleScreen/ReturnToTitle.gd" type="Script" id=2]
[node name="NewGAme" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CenterContainer" type="CenterContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
margin_left = 295.0
margin_top = 337.0
margin_right = 728.0
margin_bottom = 431.0
[node name="Label" type="Label" parent="CenterContainer/VBoxContainer"]
margin_right = 433.0
margin_bottom = 42.0
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 0
custom_constants/shadow_offset_y = 5
custom_fonts/font = ExtResource( 1 )
text = "new game scene"
[node name="Button" type="Button" parent="CenterContainer/VBoxContainer"]
margin_top = 46.0
margin_right = 433.0
margin_bottom = 94.0
custom_fonts/font = ExtResource( 1 )
text = "Back"
[connection signal="pressed" from="CenterContainer/VBoxContainer/Button" to="." method="_on_Button_pressed"]

View File

@ -0,0 +1,4 @@
extends Control
func _on_Button_pressed():
get_tree().change_scene("res://Scenes/TitleScreen.tscn")

View File

@ -0,0 +1,5 @@
extends Button
export(String) var scene_to_load

View File

@ -0,0 +1,28 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Graphics/Fonts/CC Wild Words Roman.ttf" type="DynamicFontData" id=1]
[sub_resource type="DynamicFont" id=1]
size = 48
font_data = ExtResource( 1 )
[node name="MenuButton" type="Button"]
margin_right = 784.0
margin_bottom = 20.0
flat = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="."]
margin_right = 40.0
margin_bottom = 14.0
rect_min_size = Vector2( 360, 60 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 0
custom_constants/shadow_offset_y = 5
custom_fonts/font = SubResource( 1 )
text = "Start Game"
__meta__ = {
"_edit_use_anchors_": false
}

View File

@ -0,0 +1,8 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[sub_resource type="DynamicFontData" id=1]
font_path = "res://Graphics/Fonts/CC Wild Words Roman.ttf"
[resource]
size = 48
font_data = SubResource( 1 )

16
Scenes/Title_Screen.gd Normal file
View File

@ -0,0 +1,16 @@
extends Control
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
for button in $Menu/CenterRow/Buttons.get_children():
button.connect("pressed", self, "_on_Button_pressed", [button.scene_to_load])
func _on_Button_pressed(scene_to_load):
get_tree().change_scene(scene_to_load)

View File

@ -17,7 +17,5 @@ force/max_rate=false
force/max_rate_hz=44100 force/max_rate_hz=44100
edit/trim=false edit/trim=false
edit/normalize=false edit/normalize=false
edit/loop_mode=0 edit/loop=false
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0 compress/mode=0