forked from team-sg/hero-mark-2
begin work on game over screen
This commit is contained in:
parent
01cca79c79
commit
12ea0b0b72
7 changed files with 160 additions and 15 deletions
18
menus/game_over.gd
Normal file
18
menus/game_over.gd
Normal file
|
@ -0,0 +1,18 @@
|
|||
extends Node
|
||||
|
||||
onready var retry_button = $Panel/Retry
|
||||
onready var exit_button = $Panel/Exit
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
get_tree().paused = true
|
||||
retry_button.grab_focus()
|
||||
|
||||
func _on_Exit_button_down():
|
||||
get_tree().paused = false
|
||||
SceneManager.current_scene = load("res://menus/level_select_scholar.tscn").instance()
|
||||
|
||||
|
||||
func _on_Retry_button_down():
|
||||
get_tree().paused = true
|
||||
Game.restart_level()
|
103
menus/game_over.tscn
Normal file
103
menus/game_over.tscn
Normal file
|
@ -0,0 +1,103 @@
|
|||
[gd_scene load_steps=11 format=2]
|
||||
|
||||
[ext_resource path="res://shaders/ska_plane.gdshader" type="Shader" id=1]
|
||||
[ext_resource path="res://objects/hud/3d_text.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://ui/theme.tres" type="Theme" id=3]
|
||||
[ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=4]
|
||||
[ext_resource path="res://graphics/hud/pause_arrow.png" type="Texture" id=5]
|
||||
[ext_resource path="res://shaders/wibble_wobble.gdshader" type="Shader" id=6]
|
||||
[ext_resource path="res://objects/hud/menu_sounds.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://menus/game_over.gd" type="Script" id=8]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=1]
|
||||
shader = ExtResource( 1 )
|
||||
shader_param/color_1 = Color( 0.305882, 0.305882, 0.305882, 1 )
|
||||
shader_param/color_2 = Color( 0.223529, 0.223529, 0.223529, 1 )
|
||||
shader_param/checker_size = Vector2( 16, 8 )
|
||||
shader_param/pan_speed = Vector2( 16, 0 )
|
||||
shader_param/cycle_speed = Vector2( 1, 0 )
|
||||
shader_param/cycle_alternation = Vector2( 16, 0 )
|
||||
shader_param/uv_transform = Transform2D( 1, 1, 0, 1, 0, 0 )
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=10]
|
||||
shader = ExtResource( 6 )
|
||||
shader_param/speed = Vector2( 4, 8 )
|
||||
shader_param/ammount = Vector2( 1, 1 )
|
||||
shader_param/offset = Vector2( 0, 0 )
|
||||
shader_param/delay = Vector2( 0, 0 )
|
||||
|
||||
[node name="Node" type="Node"]
|
||||
script = ExtResource( 8 )
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
material = SubResource( 1 )
|
||||
margin_right = 256.0
|
||||
margin_bottom = 192.0
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
margin_left = 72.0
|
||||
margin_top = 96.0
|
||||
margin_right = 184.0
|
||||
margin_bottom = 136.0
|
||||
theme = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="Panel"]
|
||||
material = ExtResource( 4 )
|
||||
margin_left = 16.0
|
||||
margin_top = 8.0
|
||||
margin_right = 93.0
|
||||
margin_bottom = 44.0
|
||||
text = "RETRY LEVEL
|
||||
EXIT TO MAP
|
||||
"
|
||||
|
||||
[node name="Retry" type="TextureButton" parent="Panel"]
|
||||
material = SubResource( 10 )
|
||||
margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 16.0
|
||||
texture_focused = ExtResource( 5 )
|
||||
|
||||
[node name="Exit" type="TextureButton" parent="Panel"]
|
||||
material = SubResource( 10 )
|
||||
margin_left = 8.0
|
||||
margin_top = 21.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 29.0
|
||||
texture_focused = ExtResource( 5 )
|
||||
|
||||
[node name="MenuSounds" parent="." instance=ExtResource( 7 )]
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
material = ExtResource( 4 )
|
||||
margin_top = 59.0
|
||||
margin_right = 256.0
|
||||
margin_bottom = 82.0
|
||||
theme = ExtResource( 3 )
|
||||
text = "In reality, the game is
|
||||
only over when you give up"
|
||||
align = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="."]
|
||||
material = ExtResource( 4 )
|
||||
margin_top = 152.0
|
||||
margin_right = 256.0
|
||||
margin_bottom = 175.0
|
||||
theme = ExtResource( 3 )
|
||||
text = "The only way to improve is to learn
|
||||
from mistakes"
|
||||
align = 1
|
||||
|
||||
[node name="3DText" parent="." instance=ExtResource( 2 )]
|
||||
anim = "game over"
|
||||
|
||||
[connection signal="button_down" from="Panel/Retry" to="." method="_on_Retry_button_down"]
|
||||
[connection signal="button_down" from="Panel/Retry" to="3DText" method="play_confirm_sound"]
|
||||
[connection signal="focus_entered" from="Panel/Retry" to="MenuSounds" method="play_select_sound"]
|
||||
[connection signal="button_down" from="Panel/Exit" to="." method="_on_Exit_button_down"]
|
||||
[connection signal="button_down" from="Panel/Exit" to="3DText" method="play_confirm_sound"]
|
||||
[connection signal="focus_entered" from="Panel/Exit" to="MenuSounds" method="play_select_sound"]
|
Loading…
Add table
Add a link
Reference in a new issue