game over screen
This commit is contained in:
parent
e49de76c47
commit
035bd68980
7 changed files with 68 additions and 12 deletions
Binary file not shown.
BIN
audio/music/intro.ogg
Normal file
BIN
audio/music/intro.ogg
Normal file
Binary file not shown.
15
audio/music/intro.ogg.import
Normal file
15
audio/music/intro.ogg.import
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="ogg_vorbis"
|
||||||
|
type="AudioStreamOGGVorbis"
|
||||||
|
path="res://.import/intro.ogg-a141f549457bc6a41bef73e129d9f7b6.oggstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://audio/music/intro.ogg"
|
||||||
|
dest_files=[ "res://.import/intro.ogg-a141f549457bc6a41bef73e129d9f7b6.oggstr" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
|
@ -181,7 +181,3 @@ func _enter_code():
|
||||||
dir.list_dir_end()
|
dir.list_dir_end()
|
||||||
"SKELETON":
|
"SKELETON":
|
||||||
Game.keys = 50
|
Game.keys = 50
|
||||||
"GOVERMAN":
|
|
||||||
var map = get_tree().get_nodes_in_group("map").pop_back()
|
|
||||||
var gover = load("res://menus/game_over.tscn").instance()
|
|
||||||
map.add_child(gover)
|
|
||||||
|
|
|
@ -243,7 +243,12 @@ func _on_player_died() -> void:
|
||||||
Audio.ac_music.stream_paused = true
|
Audio.ac_music.stream_paused = true
|
||||||
yield(time_tween, "finished")
|
yield(time_tween, "finished")
|
||||||
yield(get_tree().create_timer(1.0 * 0.1), "timeout")
|
yield(get_tree().create_timer(1.0 * 0.1), "timeout")
|
||||||
call_deferred("restart_level")
|
Engine.time_scale = 1.0
|
||||||
|
Fade.fade_out(0.4)
|
||||||
|
yield(Fade, "fade_finished")
|
||||||
|
var map = get_map()
|
||||||
|
var gover = load("res://menus/game_over.tscn").instance()
|
||||||
|
map.add_child(gover)
|
||||||
else:
|
else:
|
||||||
# count death
|
# count death
|
||||||
lives -= 1
|
lives -= 1
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
extends Node
|
extends CanvasLayer
|
||||||
|
|
||||||
onready var retry_button = $Panel/Retry
|
onready var retry_button = $Panel/Retry
|
||||||
onready var exit_button = $Panel/Exit
|
onready var exit_button = $Panel/Exit
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
|
Fade.fade_in(0.4)
|
||||||
get_tree().paused = true
|
get_tree().paused = true
|
||||||
retry_button.grab_focus()
|
retry_button.grab_focus()
|
||||||
|
Audio.ac_music.stream_paused = false
|
||||||
|
Audio.play_music(load("res://audio/music/74(game_over).ogg"))
|
||||||
|
|
||||||
func _on_Exit_button_down():
|
func _on_Exit_button_down():
|
||||||
get_tree().paused = false
|
get_tree().paused = false
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
[gd_scene load_steps=11 format=2]
|
[gd_scene load_steps=15 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://shaders/ska_plane.gdshader" type="Shader" id=1]
|
[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://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/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://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://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://objects/hud/menu_sounds.tscn" type="PackedScene" id=7]
|
||||||
[ext_resource path="res://menus/game_over.gd" type="Script" id=8]
|
[ext_resource path="res://menus/game_over.gd" type="Script" id=8]
|
||||||
|
[ext_resource path="res://shaders/wibble_border.gdshader" type="Shader" id=9]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id=1]
|
[sub_resource type="ShaderMaterial" id=1]
|
||||||
shader = ExtResource( 1 )
|
shader = ExtResource( 1 )
|
||||||
|
@ -19,6 +19,22 @@ shader_param/cycle_speed = Vector2( 1, 0 )
|
||||||
shader_param/cycle_alternation = Vector2( 16, 0 )
|
shader_param/cycle_alternation = Vector2( 16, 0 )
|
||||||
shader_param/uv_transform = Transform2D( 1, 1, 0, 1, 0, 0 )
|
shader_param/uv_transform = Transform2D( 1, 1, 0, 1, 0, 0 )
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id=11]
|
||||||
|
shader = ExtResource( 6 )
|
||||||
|
shader_param/speed = Vector2( 0, 4 )
|
||||||
|
shader_param/ammount = Vector2( 0, 1 )
|
||||||
|
shader_param/offset = Vector2( 0, 1 )
|
||||||
|
shader_param/delay = Vector2( 0, 0 )
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id=14]
|
||||||
|
shader = ExtResource( 9 )
|
||||||
|
shader_param/speed = Vector2( 0, 4 )
|
||||||
|
shader_param/ammount = Vector2( 0, 1 )
|
||||||
|
shader_param/offset = Vector2( 0, 1 )
|
||||||
|
shader_param/delay = Vector2( 0, 0 )
|
||||||
|
shader_param/border_color = Color( 0.219608, 0.219608, 0.219608, 1 )
|
||||||
|
shader_param/border_corners = true
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id=10]
|
[sub_resource type="ShaderMaterial" id=10]
|
||||||
shader = ExtResource( 6 )
|
shader = ExtResource( 6 )
|
||||||
shader_param/speed = Vector2( 4, 8 )
|
shader_param/speed = Vector2( 4, 8 )
|
||||||
|
@ -26,7 +42,27 @@ shader_param/ammount = Vector2( 1, 1 )
|
||||||
shader_param/offset = Vector2( 0, 0 )
|
shader_param/offset = Vector2( 0, 0 )
|
||||||
shader_param/delay = Vector2( 0, 0 )
|
shader_param/delay = Vector2( 0, 0 )
|
||||||
|
|
||||||
[node name="Node" type="Node"]
|
[sub_resource type="ShaderMaterial" id=12]
|
||||||
|
shader = ExtResource( 9 )
|
||||||
|
shader_param/speed = Vector2( 2, 0 )
|
||||||
|
shader_param/ammount = Vector2( 4, 0 )
|
||||||
|
shader_param/offset = Vector2( 2, 0 )
|
||||||
|
shader_param/delay = Vector2( 0, 0 )
|
||||||
|
shader_param/border_color = Color( 0.219608, 0.219608, 0.219608, 1 )
|
||||||
|
shader_param/border_corners = true
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id=13]
|
||||||
|
shader = ExtResource( 9 )
|
||||||
|
shader_param/speed = Vector2( 0, 0 )
|
||||||
|
shader_param/ammount = Vector2( 0, 0 )
|
||||||
|
shader_param/offset = Vector2( 0, 1 )
|
||||||
|
shader_param/delay = Vector2( 0, 0 )
|
||||||
|
shader_param/border_color = Color( 0.219608, 0.219608, 0.219608, 1 )
|
||||||
|
shader_param/border_corners = true
|
||||||
|
|
||||||
|
[node name="GameOver" type="CanvasLayer"]
|
||||||
|
pause_mode = 2
|
||||||
|
layer = 110
|
||||||
script = ExtResource( 8 )
|
script = ExtResource( 8 )
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="."]
|
[node name="ColorRect" type="ColorRect" parent="."]
|
||||||
|
@ -35,6 +71,7 @@ margin_right = 256.0
|
||||||
margin_bottom = 192.0
|
margin_bottom = 192.0
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="."]
|
[node name="Panel" type="Panel" parent="."]
|
||||||
|
material = SubResource( 11 )
|
||||||
margin_left = 72.0
|
margin_left = 72.0
|
||||||
margin_top = 96.0
|
margin_top = 96.0
|
||||||
margin_right = 184.0
|
margin_right = 184.0
|
||||||
|
@ -45,7 +82,7 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Panel"]
|
[node name="Label" type="Label" parent="Panel"]
|
||||||
material = ExtResource( 4 )
|
material = SubResource( 14 )
|
||||||
margin_left = 16.0
|
margin_left = 16.0
|
||||||
margin_top = 8.0
|
margin_top = 8.0
|
||||||
margin_right = 93.0
|
margin_right = 93.0
|
||||||
|
@ -73,7 +110,7 @@ texture_focused = ExtResource( 5 )
|
||||||
[node name="MenuSounds" parent="." instance=ExtResource( 7 )]
|
[node name="MenuSounds" parent="." instance=ExtResource( 7 )]
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Label" type="Label" parent="."]
|
||||||
material = ExtResource( 4 )
|
material = SubResource( 12 )
|
||||||
margin_top = 59.0
|
margin_top = 59.0
|
||||||
margin_right = 256.0
|
margin_right = 256.0
|
||||||
margin_bottom = 82.0
|
margin_bottom = 82.0
|
||||||
|
@ -83,7 +120,7 @@ only over when you give up"
|
||||||
align = 1
|
align = 1
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="."]
|
[node name="Label2" type="Label" parent="."]
|
||||||
material = ExtResource( 4 )
|
material = SubResource( 13 )
|
||||||
margin_top = 152.0
|
margin_top = 152.0
|
||||||
margin_right = 256.0
|
margin_right = 256.0
|
||||||
margin_bottom = 175.0
|
margin_bottom = 175.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue