First_Person_Slapper/HUD.tscn

157 lines
4.1 KiB
Plaintext
Raw Normal View History

2022-10-11 15:07:07 -04:00
[gd_scene load_steps=9 format=2]
2022-10-11 13:48:59 -04:00
[ext_resource path="res://SlapGauge.gd" type="Script" id=1]
2022-10-11 14:32:39 -04:00
[ext_resource path="res://Start.gd" type="Script" id=2]
2022-10-11 13:48:59 -04:00
[ext_resource path="res://fonts/TorontoSubwayRegular.ttf" type="DynamicFontData" id=3]
[sub_resource type="DynamicFont" id=4]
size = 19
outline_size = 2
outline_color = Color( 0, 0, 0, 1 )
use_mipmaps = true
use_filter = true
font_data = ExtResource( 3 )
[sub_resource type="Theme" id=8]
default_font = SubResource( 4 )
[sub_resource type="Shader" id=6]
code = "shader_type canvas_item;
render_mode unshaded;
uniform float fill;
uniform float kill;
uniform vec4 bkgcol = vec4(0.0, 0.0, 0.0, 0.3);
uniform vec4 kilcol = vec4(0.5, 0.0, 0.0, 0.3);
void fragment() {
bool is = false;
if (fill >= UV.x) {
COLOR = vec4(UV.x,-UV.x + .5,-UV.x + 1.0,1.0);
COLOR.rgb *= vec3(cos(UV.y * 2.0) / 1.5,cos(UV.y * 2.0) / 1.5,cos(UV.y * 2.0) / 1.5);
is = true;
if (kill >= UV.x)
COLOR.rgb += vec3(0.1,0.1,0.1);
}
else if (UV.x > kill + 0.001)
COLOR = kilcol;
else COLOR = bkgcol;
if ((UV.y < .2 || UV.y > 0.8) && (UV.x > kill + 0.001 || UV.x < kill - 0.001) && !is)
COLOR.a = 0.05;
}"
[sub_resource type="ShaderMaterial" id=11]
shader = SubResource( 6 )
shader_param/fill = 0.0
shader_param/kill = null
shader_param/bkgcol = Plane( 0, 0, 0, 0.3 )
shader_param/kilcol = Plane( 0.5, 0, 0, 0.3 )
2022-10-11 14:32:39 -04:00
[sub_resource type="DynamicFont" id=7]
size = 88
outline_size = 5
outline_color = Color( 0, 0, 0, 1 )
use_filter = true
font_data = ExtResource( 3 )
2022-10-11 13:48:59 -04:00
2022-10-11 14:32:39 -04:00
[node name="HUD" type="CanvasLayer"]
2022-10-11 14:57:56 -04:00
follow_viewport_enable = true
2022-10-11 13:48:59 -04:00
[node name="PlayerLayer" type="CanvasLayer" parent="."]
layer = 0
[node name="Crosshair" type="ColorRect" parent="PlayerLayer"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -3.0
margin_top = -3.0
margin_right = 3.0
margin_bottom = 3.0
rect_min_size = Vector2( 6, 6 )
[node name="ActualHUD" type="Control" parent="PlayerLayer"]
2022-10-11 14:58:23 -04:00
anchor_left = 0.037
anchor_top = 0.914
anchor_right = 0.037
anchor_bottom = 0.916
2022-10-11 13:48:59 -04:00
margin_right = 40.0
margin_bottom = 40.0
2022-10-11 14:57:56 -04:00
theme = SubResource( 8 )
2022-10-11 13:48:59 -04:00
[node name="SlapGauge" type="ColorRect" parent="PlayerLayer/ActualHUD"]
2022-10-11 13:48:59 -04:00
material = SubResource( 11 )
2022-10-11 14:58:23 -04:00
margin_right = 291.36
margin_bottom = 23.0
2022-10-11 13:48:59 -04:00
script = ExtResource( 1 )
[node name="SlapLabel" type="Label" parent="PlayerLayer/ActualHUD/SlapGauge"]
2022-10-11 13:48:59 -04:00
modulate = Color( 1, 1, 1, 0.611765 )
anchor_left = 12.662
anchor_top = 7.324
anchor_right = 12.662
anchor_bottom = 7.324
2022-10-11 14:58:23 -04:00
margin_left = -3683.2
margin_top = -169.452
margin_right = -3572.2
margin_bottom = -137.452
2022-10-11 13:48:59 -04:00
text = "Slap"
2022-10-11 14:32:39 -04:00
[node name="MenuLayer" type="CanvasLayer" parent="."]
layer = 2
[node name="Start" type="Control" parent="MenuLayer"]
2022-10-11 14:32:39 -04:00
pause_mode = 2
2022-10-11 14:59:07 -04:00
visible = false
2022-10-11 14:32:39 -04:00
margin_right = 40.0
margin_bottom = 40.0
theme = SubResource( 8 )
script = ExtResource( 2 )
[node name="Background" type="ColorRect" parent="MenuLayer/Start"]
2022-10-11 14:57:56 -04:00
margin_left = -4.0
margin_top = -8.0
margin_right = 1927.0
margin_bottom = 1085.0
2022-10-11 14:32:39 -04:00
color = Color( 0.14902, 0.121569, 0.121569, 1 )
[node name="Title" type="Label" parent="MenuLayer/Start"]
2022-10-11 14:57:56 -04:00
margin_left = 532.0
margin_top = 353.0
margin_right = 1414.0
margin_bottom = 455.0
2022-10-11 14:32:39 -04:00
custom_fonts/font = SubResource( 7 )
text = "FIRST PERSON SLAPPER"
[node name="New Game" type="Button" parent="MenuLayer/Start"]
2022-10-11 14:57:56 -04:00
margin_left = 886.0
margin_top = 554.0
margin_right = 1061.0
margin_bottom = 598.0
2022-10-11 14:32:39 -04:00
text = "New Game"
[node name="Quit to Desktop" type="Button" parent="MenuLayer/Start"]
2022-10-11 14:57:56 -04:00
margin_left = 887.0
margin_top = 664.0
margin_right = 1062.0
margin_bottom = 708.0
2022-10-11 14:32:39 -04:00
text = "Quit to Desktop"
[node name="Quit Game" type="Button" parent="MenuLayer/Start"]
2022-10-11 14:57:56 -04:00
margin_left = 887.0
margin_top = 609.0
margin_right = 1062.0
margin_bottom = 653.0
2022-10-11 14:32:39 -04:00
text = "Quit Game"
2022-10-11 15:41:00 -04:00
[node name="MenuMusic" type="AudioStreamPlayer" parent="MenuLayer/Start"]
2022-10-11 15:19:36 -04:00
[connection signal="pressed" from="MenuLayer/Start/New Game" to="MenuLayer/Start" method="_on_New_Game_pressed"]
[connection signal="pressed" from="MenuLayer/Start/Quit to Desktop" to="MenuLayer/Start" method="_on_Quit_to_Desktop_Button_pressed"]
[connection signal="pressed" from="MenuLayer/Start/Quit Game" to="MenuLayer/Start" method="_on_Quit_Game_pressed"]