mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-13 22:12:23 +02:00
Title screen and credits
Also skipping with space. Nice.
This commit is contained in:
7
src/Fonts/Harmonic/Harmonic12.tres
Normal file
7
src/Fonts/Harmonic/Harmonic12.tres
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="DynamicFont" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Fonts/Harmonic/Harmonic.ttf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
size = 12
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
14
src/Menus/Credits/Credits.gd
Normal file
14
src/Menus/Credits/Credits.gd
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
export(String, FILE, "*.tscn,*.scn") var scene_to_load = ""
|
||||||
|
onready var animation_player = $AnimationPlayer
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
if Input.is_action_pressed("skip"):
|
||||||
|
animation_player.playback_speed = 8.0
|
||||||
|
else:
|
||||||
|
animation_player.playback_speed = 1.0
|
||||||
|
|
||||||
|
|
||||||
|
func _on_AnimationPlayer_animation_finished(anim_name):
|
||||||
|
get_tree().change_scene(scene_to_load)
|
||||||
83
src/Menus/Credits/Credits.tscn
Normal file
83
src/Menus/Credits/Credits.tscn
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Fonts/Harmonic/Harmonic12.tres" type="DynamicFont" id=1]
|
||||||
|
[ext_resource path="res://Menus/Credits/Credits.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=1]
|
||||||
|
resource_name = "scroll"
|
||||||
|
length = 25.0
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("Label:margin_top")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 24.9 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 200.0, -600 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Credits" type="Node2D"]
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
scene_to_load = "res://Menus/TitleScreen/TitleScreen.tscn"
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
margin_right = 320.0
|
||||||
|
margin_bottom = 180.0
|
||||||
|
color = Color( 0, 0, 0, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="."]
|
||||||
|
margin_left = 10.0
|
||||||
|
margin_top = -436.145
|
||||||
|
margin_right = 40.0
|
||||||
|
margin_bottom = 14.0
|
||||||
|
custom_fonts/font = ExtResource( 1 )
|
||||||
|
text = "---- Team ----
|
||||||
|
DerAnonymos
|
||||||
|
https://www.youtube.com/c/DerAnonymosLP
|
||||||
|
https://twitch.tv/deranonymos
|
||||||
|
https://www.instagram.com/deranonymos/
|
||||||
|
|
||||||
|
Katsuhira
|
||||||
|
https://www.youtube.com/c/Katsuhira
|
||||||
|
https://twitter.com/nKatsuhira
|
||||||
|
|
||||||
|
Sonaion
|
||||||
|
|
||||||
|
Mienek
|
||||||
|
|
||||||
|
Streamfire
|
||||||
|
https://twitter.com/_streamfire_
|
||||||
|
|
||||||
|
YellowKamel
|
||||||
|
https://www.youtube.com/channel/UCgF6E6Hk4cNQBGDmcAEp5CA
|
||||||
|
|
||||||
|
creyD
|
||||||
|
|
||||||
|
---- Help ----
|
||||||
|
Dave Loyd, Crawl
|
||||||
|
https://twitter.com/DuzzOnDrums
|
||||||
|
https://www.powerhoof.com/
|
||||||
|
|
||||||
|
HeartBeast
|
||||||
|
https://www.youtube.com/user/uheartbeast
|
||||||
|
https://www.heartgamedev.com
|
||||||
|
|
||||||
|
---- Fonts ----
|
||||||
|
Harmonic by Monkopus
|
||||||
|
https://monkopus.itch.io/
|
||||||
|
https://twitter.com/monkopus
|
||||||
|
https://www.instagram.com/monkopusgames/"
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
autoplay = "scroll"
|
||||||
|
anims/scroll = SubResource( 1 )
|
||||||
|
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
|
||||||
@@ -3,6 +3,9 @@ extends AnimatedSprite
|
|||||||
signal startup_finished
|
signal startup_finished
|
||||||
var finished_once := false
|
var finished_once := false
|
||||||
|
|
||||||
|
export(int) var startup_finish_frame = 65
|
||||||
|
export(int) var loop_frame = 80
|
||||||
|
|
||||||
# Declare member variables here. Examples:
|
# Declare member variables here. Examples:
|
||||||
# var a = 2
|
# var a = 2
|
||||||
# var b = "text"
|
# var b = "text"
|
||||||
@@ -12,6 +15,14 @@ var finished_once := false
|
|||||||
func _ready():
|
func _ready():
|
||||||
play("default")
|
play("default")
|
||||||
|
|
||||||
|
func _process(delta):
|
||||||
|
if Input.is_action_just_pressed("skip"):
|
||||||
|
frame = startup_finish_frame
|
||||||
|
|
||||||
|
if frame > startup_finish_frame:
|
||||||
|
if not finished_once:
|
||||||
|
emit_signal("startup_finished")
|
||||||
|
finished_once = true
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
#func _process(delta):
|
#func _process(delta):
|
||||||
@@ -19,7 +30,4 @@ func _ready():
|
|||||||
|
|
||||||
|
|
||||||
func _on_Startup_animation_finished():
|
func _on_Startup_animation_finished():
|
||||||
if not finished_once:
|
frame = loop_frame
|
||||||
emit_signal("startup_finished")
|
|
||||||
finished_once = true
|
|
||||||
frame = 80
|
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ extends Control
|
|||||||
class_name TitleScreen
|
class_name TitleScreen
|
||||||
|
|
||||||
onready var new_game_button = $"VBoxContainer/NewGameButton"
|
onready var new_game_button = $"VBoxContainer/NewGameButton"
|
||||||
|
onready var animation_player = $AnimationPlayer
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
new_game_button.grab_focus()
|
animation_player.play("__INIT__")
|
||||||
|
|
||||||
|
|
||||||
func _on_Startup_startup_finished():
|
func _on_Startup_startup_finished():
|
||||||
pass # Replace with function body.
|
new_game_button.grab_focus()
|
||||||
|
animation_player.play("show_buttons")
|
||||||
|
|||||||
@@ -1,9 +1,161 @@
|
|||||||
[gd_scene load_steps=4 format=2]
|
[gd_scene load_steps=6 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Menus/TitleScreen/TitleScreenButton.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://Menus/TitleScreen/TitleScreenButton.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://Menus/Startup/Startup.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Menus/Startup/Startup.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://Menus/TitleScreen/TitleScreen.gd" type="Script" id=3]
|
[ext_resource path="res://Menus/TitleScreen/TitleScreen.gd" type="Script" id=3]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=2]
|
||||||
|
resource_name = "__INIT__"
|
||||||
|
length = 0.1
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("VBoxContainer/NewGameButton:anchor_left")
|
||||||
|
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": [ 1.25 ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("VBoxContainer/NewGameButton:anchor_right")
|
||||||
|
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": [ 1.25 ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("VBoxContainer/CreditsButton:anchor_left")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25 ]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/path = NodePath("VBoxContainer/CreditsButton:anchor_right")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25 ]
|
||||||
|
}
|
||||||
|
tracks/4/type = "value"
|
||||||
|
tracks/4/path = NodePath("VBoxContainer/QuitButton:anchor_left")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25 ]
|
||||||
|
}
|
||||||
|
tracks/5/type = "value"
|
||||||
|
tracks/5/path = NodePath("VBoxContainer/QuitButton:anchor_right")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=1]
|
||||||
|
resource_name = "show_buttons"
|
||||||
|
step = 0.3
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("VBoxContainer/NewGameButton:anchor_left")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.9 ),
|
||||||
|
"transitions": PoolRealArray( 1, -2 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25, 0.0 ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("VBoxContainer/NewGameButton:anchor_right")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.9 ),
|
||||||
|
"transitions": PoolRealArray( 1, -2 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25, 0.0 ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("VBoxContainer/CreditsButton:anchor_left")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.6 ),
|
||||||
|
"transitions": PoolRealArray( 1, -2 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25, 0.0 ]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/path = NodePath("VBoxContainer/CreditsButton:anchor_right")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.6 ),
|
||||||
|
"transitions": PoolRealArray( 1, -2 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25, 0.0 ]
|
||||||
|
}
|
||||||
|
tracks/4/type = "value"
|
||||||
|
tracks/4/path = NodePath("VBoxContainer/QuitButton:anchor_left")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.3 ),
|
||||||
|
"transitions": PoolRealArray( 1, -2 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25, 0.0 ]
|
||||||
|
}
|
||||||
|
tracks/5/type = "value"
|
||||||
|
tracks/5/path = NodePath("VBoxContainer/QuitButton:anchor_right")
|
||||||
|
tracks/5/interp = 1
|
||||||
|
tracks/5/loop_wrap = true
|
||||||
|
tracks/5/imported = false
|
||||||
|
tracks/5/enabled = true
|
||||||
|
tracks/5/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.3 ),
|
||||||
|
"transitions": PoolRealArray( 1, -2 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 1.25, 0.0 ]
|
||||||
|
}
|
||||||
|
|
||||||
[node name="TitleScreen" type="Control"]
|
[node name="TitleScreen" type="Control"]
|
||||||
anchor_left = -0.00168862
|
anchor_left = -0.00168862
|
||||||
anchor_top = -0.003002
|
anchor_top = -0.003002
|
||||||
@@ -20,7 +172,7 @@ __meta__ = {
|
|||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
anchor_left = 0.623951
|
anchor_left = 0.623951
|
||||||
anchor_top = 0.225224
|
anchor_top = 0.056
|
||||||
anchor_right = 0.970827
|
anchor_right = 0.970827
|
||||||
anchor_bottom = 0.469669
|
anchor_bottom = 0.469669
|
||||||
margin_left = 1.52588e-05
|
margin_left = 1.52588e-05
|
||||||
@@ -30,20 +182,37 @@ __meta__ = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="NewGameButton" parent="VBoxContainer" instance=ExtResource( 1 )]
|
[node name="NewGameButton" parent="VBoxContainer" instance=ExtResource( 1 )]
|
||||||
|
margin_right = 111.0
|
||||||
scene_to_load = "res://World.tscn"
|
scene_to_load = "res://World.tscn"
|
||||||
|
|
||||||
[node name="Label" parent="VBoxContainer/NewGameButton" index="0"]
|
[node name="Label" parent="VBoxContainer/NewGameButton" index="0"]
|
||||||
text = "New Game"
|
text = "New Game"
|
||||||
|
|
||||||
[node name="QuitButton" parent="VBoxContainer" instance=ExtResource( 1 )]
|
[node name="CreditsButton" parent="VBoxContainer" instance=ExtResource( 1 )]
|
||||||
margin_top = 24.0
|
margin_top = 24.0
|
||||||
|
margin_right = 111.0
|
||||||
margin_bottom = 44.0
|
margin_bottom = 44.0
|
||||||
|
scene_to_load = "res://Menus/Credits/Credits.tscn"
|
||||||
|
|
||||||
|
[node name="Label" parent="VBoxContainer/CreditsButton" index="0"]
|
||||||
|
text = "Credits"
|
||||||
|
|
||||||
|
[node name="QuitButton" parent="VBoxContainer" instance=ExtResource( 1 )]
|
||||||
|
margin_top = 48.0
|
||||||
|
margin_right = 111.0
|
||||||
|
margin_bottom = 68.0
|
||||||
quit = true
|
quit = true
|
||||||
|
|
||||||
[node name="Label" parent="VBoxContainer/QuitButton" index="0"]
|
[node name="Label" parent="VBoxContainer/QuitButton" index="0"]
|
||||||
text = "Quit"
|
text = "Quit"
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
anims/__INIT__ = SubResource( 2 )
|
||||||
|
anims/show_buttons = SubResource( 1 )
|
||||||
[connection signal="startup_finished" from="Startup" to="." method="_on_Startup_startup_finished"]
|
[connection signal="startup_finished" from="Startup" to="." method="_on_Startup_startup_finished"]
|
||||||
|
|
||||||
[editable path="VBoxContainer/NewGameButton"]
|
[editable path="VBoxContainer/NewGameButton"]
|
||||||
|
|
||||||
|
[editable path="VBoxContainer/CreditsButton"]
|
||||||
|
|
||||||
[editable path="VBoxContainer/QuitButton"]
|
[editable path="VBoxContainer/QuitButton"]
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ _global_script_class_icons={
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="LD46 Game"
|
config/name="LD46 Game"
|
||||||
run/main_scene="res://World.tscn"
|
run/main_scene="res://Menus/TitleScreen/TitleScreen.tscn"
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
@@ -98,6 +98,12 @@ down={
|
|||||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
skip={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":10,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[layer_names]
|
[layer_names]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user