mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-11 21:22:22 +02:00
Added lose screen and updated player
This commit is contained in:
10
src/Menus/LoseScreen/LoseScreen.gd
Normal file
10
src/Menus/LoseScreen/LoseScreen.gd
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
export(String, FILE, "*.tscn,*.scn") var restart_scene = ""
|
||||||
|
export(String, FILE, "*.tscn,*.scn") var title_screen = ""
|
||||||
|
|
||||||
|
func _on_Restart_pressed():
|
||||||
|
get_tree().change_scene(restart_scene)
|
||||||
|
|
||||||
|
func _on_TitleScreen_pressed():
|
||||||
|
get_tree().change_scene(title_screen)
|
||||||
124
src/Menus/LoseScreen/LoseScreen.tscn
Normal file
124
src/Menus/LoseScreen/LoseScreen.tscn
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Fonts/Harmonic/Harmonic24.tres" type="DynamicFont" id=1]
|
||||||
|
[ext_resource path="res://Fonts/Harmonic/Harmonic12.tres" type="DynamicFont" id=2]
|
||||||
|
[ext_resource path="res://Menus/LoseScreen/LoseScreen.gd" type="Script" id=3]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=1]
|
||||||
|
resource_name = "create"
|
||||||
|
length = 5.0
|
||||||
|
step = 1.0
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("CanvasLayer/CenterContainer/VBoxContainer/Label2:percent_visible")
|
||||||
|
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, 3 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 0.0, 0.0, 1.0 ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("CanvasLayer/CenterContainer/VBoxContainer/Label:percent_visible")
|
||||||
|
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": [ 0.0, 1.0 ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("CanvasLayer/CenterContainer/VBoxContainer/HBoxContainer/Restart:modulate")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0, 3, 4 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/path = NodePath("CanvasLayer/CenterContainer/VBoxContainer/HBoxContainer/TitleScreen:modulate")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PoolRealArray( 0, 4, 5 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="LoseScreen" type="Node2D"]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
restart_scene = "res://World.tscn"
|
||||||
|
title_screen = "res://Menus/TitleScreen/TitleScreen.tscn"
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"]
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/CenterContainer"]
|
||||||
|
margin_left = 124.0
|
||||||
|
margin_top = 98.0
|
||||||
|
margin_right = 356.0
|
||||||
|
margin_bottom = 172.0
|
||||||
|
custom_constants/separation = 10
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="CanvasLayer/CenterContainer/VBoxContainer"]
|
||||||
|
margin_right = 232.0
|
||||||
|
margin_bottom = 12.0
|
||||||
|
custom_fonts/font = ExtResource( 2 )
|
||||||
|
text = "Your friend, the slime, died."
|
||||||
|
align = 1
|
||||||
|
percent_visible = 0.0
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="CanvasLayer/CenterContainer/VBoxContainer"]
|
||||||
|
margin_top = 22.0
|
||||||
|
margin_right = 232.0
|
||||||
|
margin_bottom = 34.0
|
||||||
|
custom_fonts/font = ExtResource( 2 )
|
||||||
|
text = "And everything is worse now."
|
||||||
|
align = 1
|
||||||
|
valign = 1
|
||||||
|
percent_visible = 0.0
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/CenterContainer/VBoxContainer"]
|
||||||
|
margin_top = 44.0
|
||||||
|
margin_right = 232.0
|
||||||
|
margin_bottom = 74.0
|
||||||
|
|
||||||
|
[node name="Restart" type="Button" parent="CanvasLayer/CenterContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
margin_right = 90.0
|
||||||
|
margin_bottom = 30.0
|
||||||
|
custom_fonts/font = ExtResource( 1 )
|
||||||
|
text = "Restart"
|
||||||
|
flat = true
|
||||||
|
|
||||||
|
[node name="TitleScreen" type="Button" parent="CanvasLayer/CenterContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
margin_left = 94.0
|
||||||
|
margin_right = 232.0
|
||||||
|
margin_bottom = 30.0
|
||||||
|
custom_fonts/font = ExtResource( 1 )
|
||||||
|
text = "Title screen"
|
||||||
|
flat = true
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
autoplay = "create"
|
||||||
|
anims/create = SubResource( 1 )
|
||||||
|
[connection signal="pressed" from="CanvasLayer/CenterContainer/VBoxContainer/HBoxContainer/Restart" to="." method="_on_Restart_pressed"]
|
||||||
|
[connection signal="pressed" from="CanvasLayer/CenterContainer/VBoxContainer/HBoxContainer/TitleScreen" to="." method="_on_TitleScreen_pressed"]
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
@@ -154,4 +154,5 @@ attack={
|
|||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
environment/default_clear_color=Color( 0.0745098, 0.0705882, 0.0862745, 1 )
|
||||||
environment/default_environment="res://default_env.tres"
|
environment/default_environment="res://default_env.tres"
|
||||||
|
|||||||
Reference in New Issue
Block a user