289 lines
8.4 KiB
Plaintext
289 lines
8.4 KiB
Plaintext
[gd_scene load_steps=11 format=2]
|
|
|
|
[ext_resource path="res://SlapGauge.gd" type="Script" id=1]
|
|
[ext_resource path="res://Start.gd" type="Script" id=2]
|
|
[ext_resource path="res://fonts/TorontoSubwayRegular.ttf" type="DynamicFontData" id=3]
|
|
[ext_resource path="res://Audio/menumusic.ogg" type="AudioStream" id=4]
|
|
[ext_resource path="res://Options.gd" type="Script" id=5]
|
|
|
|
[sub_resource type="DynamicFont" id=12]
|
|
size = 39
|
|
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( 12 )
|
|
|
|
[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 )
|
|
|
|
[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 )
|
|
|
|
[node name="HUD" type="CanvasLayer"]
|
|
follow_viewport_enable = true
|
|
|
|
[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="Crosshair" type="ColorRect" parent="PlayerLayer/Crosshair"]
|
|
show_behind_parent = true
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
margin_left = -4.0
|
|
margin_top = -4.0
|
|
margin_right = 2.0
|
|
margin_bottom = 2.0
|
|
rect_min_size = Vector2( 6, 6 )
|
|
rect_scale = Vector2( 1.33213, 1.33213 )
|
|
color = Color( 0, 0, 0, 1 )
|
|
|
|
[node name="ActualHUD" type="Control" parent="PlayerLayer"]
|
|
anchor_left = 0.037
|
|
anchor_top = 0.914
|
|
anchor_right = 0.037
|
|
anchor_bottom = 0.916
|
|
margin_right = 40.0
|
|
margin_bottom = 40.0
|
|
theme = SubResource( 8 )
|
|
|
|
[node name="SlapGauge" type="ColorRect" parent="PlayerLayer/ActualHUD"]
|
|
material = SubResource( 11 )
|
|
margin_right = 291.36
|
|
margin_bottom = 23.0
|
|
rect_scale = Vector2( 1.88, 1.88 )
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="SlapLabel" type="Label" parent="PlayerLayer/ActualHUD"]
|
|
modulate = Color( 1, 1, 1, 0.611765 )
|
|
anchor_left = 12.662
|
|
anchor_top = 7.324
|
|
anchor_right = 12.662
|
|
anchor_bottom = 7.324
|
|
margin_left = -500.48
|
|
margin_top = -309.78
|
|
margin_right = -389.48
|
|
margin_bottom = -277.78
|
|
text = "Slap"
|
|
|
|
[node name="Remaining" type="Label" parent="PlayerLayer/ActualHUD"]
|
|
margin_left = 1268.96
|
|
margin_top = -940.12
|
|
margin_right = 1403.96
|
|
margin_bottom = -918.12
|
|
text = "Remaining balls:"
|
|
|
|
[node name="Balls" type="Label" parent="PlayerLayer/ActualHUD"]
|
|
margin_left = 1416.0
|
|
margin_top = -937.0
|
|
margin_right = 1774.0
|
|
margin_bottom = -892.0
|
|
text = "0"
|
|
align = 2
|
|
|
|
[node name="MenuLayer" type="CanvasLayer" parent="."]
|
|
layer = 2
|
|
|
|
[node name="Background" type="ColorRect" parent="MenuLayer"]
|
|
margin_left = -4.0
|
|
margin_top = -8.0
|
|
margin_right = 1927.0
|
|
margin_bottom = 1085.0
|
|
color = Color( 0.0862745, 0.0705882, 0.0705882, 1 )
|
|
|
|
[node name="Start" type="Control" parent="MenuLayer"]
|
|
pause_mode = 2
|
|
margin_right = 40.0
|
|
margin_bottom = 40.0
|
|
theme = SubResource( 8 )
|
|
script = ExtResource( 2 )
|
|
|
|
[node name="Title" type="Label" parent="MenuLayer/Start"]
|
|
margin_left = 532.0
|
|
margin_top = 353.0
|
|
margin_right = 1414.0
|
|
margin_bottom = 455.0
|
|
custom_fonts/font = SubResource( 7 )
|
|
text = "FIRST PERSON SLAPPER"
|
|
|
|
[node name="New Game" type="Button" parent="MenuLayer/Start"]
|
|
margin_left = 818.0
|
|
margin_top = 547.0
|
|
margin_right = 1125.0
|
|
margin_bottom = 598.0
|
|
text = "Start Level"
|
|
|
|
[node name="Quit to Desktop" type="Button" parent="MenuLayer/Start"]
|
|
margin_left = 819.0
|
|
margin_top = 665.0
|
|
margin_right = 1124.0
|
|
margin_bottom = 716.0
|
|
text = "Quit to Desktop"
|
|
|
|
[node name="Quit Game" type="Button" parent="MenuLayer/Start"]
|
|
margin_left = 818.0
|
|
margin_top = 606.0
|
|
margin_right = 1125.0
|
|
margin_bottom = 657.0
|
|
text = "Restart Level"
|
|
|
|
[node name="MenuMusic" type="AudioStreamPlayer" parent="MenuLayer/Start"]
|
|
stream = ExtResource( 4 )
|
|
volume_db = 3.0
|
|
bus = "Music"
|
|
|
|
[node name="Options" type="Control" parent="MenuLayer/Start"]
|
|
margin_right = 40.0
|
|
margin_bottom = 40.0
|
|
theme = SubResource( 8 )
|
|
script = ExtResource( 5 )
|
|
|
|
[node name="MouseSensSlider" type="HSlider" parent="MenuLayer/Start/Options"]
|
|
margin_left = 1424.0
|
|
margin_top = 776.0
|
|
margin_right = 1751.0
|
|
margin_bottom = 808.0
|
|
rect_pivot_offset = Vector2( 199, 32 )
|
|
max_value = 0.5
|
|
step = 0.05
|
|
|
|
[node name="MousSensLbl" type="Label" parent="MenuLayer/Start/Options/MouseSensSlider"]
|
|
margin_left = -315.0
|
|
margin_top = -11.0
|
|
margin_right = -21.0
|
|
margin_bottom = 34.0
|
|
text = "Mouse Sensitivity"
|
|
|
|
[node name="SFXSlider" type="HSlider" parent="MenuLayer/Start/Options"]
|
|
margin_left = 1424.0
|
|
margin_top = 820.0
|
|
margin_right = 1751.0
|
|
margin_bottom = 852.0
|
|
rect_pivot_offset = Vector2( 199, 32 )
|
|
max_value = 1.2
|
|
step = 0.05
|
|
|
|
[node name="SFXSlider" type="Label" parent="MenuLayer/Start/Options/SFXSlider"]
|
|
margin_left = -221.0
|
|
margin_top = -7.0
|
|
margin_right = -18.0
|
|
margin_bottom = 38.0
|
|
text = "SFX Volume"
|
|
|
|
[node name="MusicSlider" type="HSlider" parent="MenuLayer/Start/Options"]
|
|
margin_left = 1424.0
|
|
margin_top = 869.0
|
|
margin_right = 1751.0
|
|
margin_bottom = 901.0
|
|
rect_pivot_offset = Vector2( -414, 50 )
|
|
max_value = 1.2
|
|
step = 0.05
|
|
|
|
[node name="MusicLbl" type="Label" parent="MenuLayer/Start/Options/MusicSlider"]
|
|
margin_left = -252.0
|
|
margin_top = -11.0
|
|
margin_right = -12.0
|
|
margin_bottom = 34.0
|
|
text = "Music Volume"
|
|
|
|
[node name="MasterVolSlider" type="HSlider" parent="MenuLayer/Start/Options"]
|
|
margin_left = 1424.0
|
|
margin_top = 918.0
|
|
margin_right = 1751.0
|
|
margin_bottom = 950.0
|
|
rect_pivot_offset = Vector2( -414, 50 )
|
|
max_value = 1.2
|
|
step = 0.05
|
|
|
|
[node name="MasterLbl" type="Label" parent="MenuLayer/Start/Options/MasterVolSlider"]
|
|
margin_left = -274.0
|
|
margin_top = -12.0
|
|
margin_right = -13.0
|
|
margin_bottom = 33.0
|
|
text = "Master Volume"
|
|
|
|
[node name="Timer" type="Timer" parent="MenuLayer/Start"]
|
|
wait_time = 2.0
|
|
|
|
[node name="Level" type="Label" parent="MenuLayer/Start"]
|
|
margin_left = 485.0
|
|
margin_top = 469.0
|
|
margin_right = 1437.0
|
|
margin_bottom = 517.0
|
|
theme = SubResource( 8 )
|
|
align = 1
|
|
|
|
[node name="Level" type="Label" parent="."]
|
|
margin_left = 485.0
|
|
margin_top = 469.0
|
|
margin_right = 1407.0
|
|
margin_bottom = 517.0
|
|
theme = SubResource( 8 )
|
|
align = 1
|
|
|
|
[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"]
|
|
[connection signal="mouse_exited" from="MenuLayer/Start/Options/MouseSensSlider" to="MenuLayer/Start/Options" method="_on_MouseSensSlider_mouse_exited"]
|
|
[connection signal="value_changed" from="MenuLayer/Start/Options/MouseSensSlider" to="MenuLayer/Start/Options" method="_on_MouseSensSlider_value_changed"]
|
|
[connection signal="mouse_exited" from="MenuLayer/Start/Options/SFXSlider" to="MenuLayer/Start/Options" method="_on_SFXSlider_mouse_exited"]
|
|
[connection signal="value_changed" from="MenuLayer/Start/Options/SFXSlider" to="MenuLayer/Start/Options" method="_on_SFXSlider_value_changed"]
|
|
[connection signal="mouse_exited" from="MenuLayer/Start/Options/MusicSlider" to="MenuLayer/Start/Options" method="_on_MusicSlider_mouse_exited"]
|
|
[connection signal="value_changed" from="MenuLayer/Start/Options/MusicSlider" to="MenuLayer/Start/Options" method="_on_MusicSlider_value_changed"]
|
|
[connection signal="mouse_exited" from="MenuLayer/Start/Options/MasterVolSlider" to="MenuLayer/Start/Options" method="_on_MasterVolSlider_mouse_exited"]
|
|
[connection signal="value_changed" from="MenuLayer/Start/Options/MasterVolSlider" to="MenuLayer/Start/Options" method="_on_MasterVolSlider_value_changed"]
|
|
[connection signal="timeout" from="MenuLayer/Start/Timer" to="MenuLayer/Start" method="_on_Timer_timeout"]
|