Pārlūkot izejas kodu

Add quit button in menu and Esc hotkey in game

Rémi Verschelde 6 gadi atpakaļ
vecāks
revīzija
c51f4ed2a4

BIN
menu/button_quit.png


+ 34 - 0
menu/button_quit.png.import

@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/button_quit.png-7f5c836f655c30d8d5235d13f9c7b96b.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://menu/button_quit.png"
+dest_files=[ "res://.import/button_quit.png-7f5c836f655c30d8d5235d13f9c7b96b.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0

BIN
menu/button_quit_hover.png


+ 34 - 0
menu/button_quit_hover.png.import

@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/button_quit_hover.png-88bea902fe8d3d8b23d4f57f395c2ecb.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://menu/button_quit_hover.png"
+dest_files=[ "res://.import/button_quit_hover.png-88bea902fe8d3d8b23d4f57f395c2ecb.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0

+ 5 - 1
menu/menu.gd

@@ -51,6 +51,10 @@ func _on_settings_pressed():
 		$ui/settings/resolution_576.pressed = true
 
 
+func _on_quit_pressed():
+	get_tree().quit()
+
+
 func _on_apply_pressed():
 	$ui/main.show()
 	$ui/settings.hide()
@@ -95,4 +99,4 @@ func _on_cancel_pressed():
 
 
 func _on_begin_load_timer_timeout():
-	get_tree().change_scene("res://level/level.tscn")
+	get_tree().change_scene("res://level/level.tscn")

+ 64 - 52
menu/menu.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=64 format=2]
+[gd_scene load_steps=66 format=2]
 
 [ext_resource path="res://menu/menu.gd" type="Script" id=1]
 [ext_resource path="res://menu/experiment.hdr" type="Texture" id=2]
@@ -10,9 +10,11 @@
 [ext_resource path="res://menu/button_play_hover.png" type="Texture" id=8]
 [ext_resource path="res://menu/button_settings.png" type="Texture" id=9]
 [ext_resource path="res://menu/button_settings_hover.png" type="Texture" id=10]
-[ext_resource path="res://menu/button_font.tres" type="DynamicFont" id=11]
-[ext_resource path="res://menu/button_pressed.tres" type="StyleBox" id=12]
-[ext_resource path="res://menu/button_normal.tres" type="StyleBox" id=13]
+[ext_resource path="res://menu/button_quit.png" type="Texture" id=11]
+[ext_resource path="res://menu/button_quit_hover.png" type="Texture" id=12]
+[ext_resource path="res://menu/button_font.tres" type="DynamicFont" id=13]
+[ext_resource path="res://menu/button_pressed.tres" type="StyleBox" id=14]
+[ext_resource path="res://menu/button_normal.tres" type="StyleBox" id=15]
 
 [sub_resource type="PanoramaSky" id=1]
 panorama = ExtResource( 2 )
@@ -223,7 +225,7 @@ environment = SubResource( 2 )
 [node name="Scene Root" parent="." instance=ExtResource( 3 )]
 
 [node name="MeshInstance" type="MeshInstance" parent="."]
-transform = Transform( 14.9811, 0, 0, 0, -6.54845e-07, 14.9811, 0, -14.9811, -6.54845e-07, 0, 0, 0 )
+transform = Transform( 15, 0, 0, 0, 0, 15, 0, -15, 0, 0, 0, 0 )
 mesh = SubResource( 3 )
 material/0 = SubResource( 4 )
 
@@ -278,6 +280,15 @@ texture_normal = ExtResource( 9 )
 texture_pressed = ExtResource( 9 )
 texture_hover = ExtResource( 10 )
 
+[node name="quit" type="TextureButton" parent="ui/main"]
+margin_left = 100.0
+margin_top = 590.0
+margin_right = 400.0
+margin_bottom = 640.0
+texture_normal = ExtResource( 11 )
+texture_pressed = ExtResource( 11 )
+texture_hover = ExtResource( 12 )
+
 [node name="settings" type="Control" parent="ui"]
 visible = false
 anchor_right = 1.0
@@ -288,7 +299,7 @@ margin_left = 30.0
 margin_top = 390.0
 margin_right = 368.0
 margin_bottom = 443.0
-custom_fonts/font = ExtResource( 11 )
+custom_fonts/font = ExtResource( 13 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 text = "Global Illumination:"
 
@@ -297,11 +308,11 @@ margin_left = 400.0
 margin_top = 390.0
 margin_right = 650.0
 margin_bottom = 447.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 9 )
-custom_styles/normal = ExtResource( 13 )
-custom_fonts/font = ExtResource( 11 )
+custom_styles/normal = ExtResource( 15 )
+custom_fonts/font = ExtResource( 13 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
 custom_colors/font_color_pressed = Color( 1, 1, 1, 1 )
@@ -315,10 +326,10 @@ margin_left = 690.0
 margin_top = 390.0
 margin_right = 940.0
 margin_bottom = 447.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 11 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 13 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -332,10 +343,10 @@ margin_left = 980.0
 margin_top = 390.0
 margin_right = 1230.0
 margin_bottom = 447.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 14 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 16 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -361,7 +372,7 @@ margin_bottom = 567.0
 custom_styles/hover = SubResource( 19 )
 custom_styles/pressed = SubResource( 20 )
 custom_styles/focus = SubResource( 21 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 23 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -376,10 +387,10 @@ margin_left = 690.0
 margin_top = 510.0
 margin_right = 940.0
 margin_bottom = 567.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 25 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 27 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -393,10 +404,10 @@ margin_left = 980.0
 margin_top = 510.0
 margin_right = 1230.0
 margin_bottom = 567.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 28 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 30 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -410,10 +421,10 @@ margin_left = 1270.0
 margin_top = 510.0
 margin_right = 1520.0
 margin_bottom = 567.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 31 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 33 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -436,10 +447,10 @@ margin_left = 400.0
 margin_top = 620.0
 margin_right = 650.0
 margin_bottom = 677.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 36 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 38 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -454,10 +465,10 @@ margin_left = 690.0
 margin_top = 620.0
 margin_right = 940.0
 margin_bottom = 677.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 40 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 42 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -471,10 +482,10 @@ margin_left = 980.0
 margin_top = 620.0
 margin_right = 1230.0
 margin_bottom = 677.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 43 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 45 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -497,10 +508,10 @@ margin_left = 400.0
 margin_top = 730.0
 margin_right = 650.0
 margin_bottom = 787.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 36 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 38 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -515,10 +526,10 @@ margin_left = 690.0
 margin_top = 730.0
 margin_right = 940.0
 margin_bottom = 787.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 36 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 38 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -532,10 +543,10 @@ margin_left = 980.0
 margin_top = 730.0
 margin_right = 1230.0
 margin_bottom = 787.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 36 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 38 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -549,10 +560,10 @@ margin_left = 1270.0
 margin_top = 730.0
 margin_right = 1520.0
 margin_bottom = 787.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 36 )
-custom_styles/normal = ExtResource( 13 )
+custom_styles/normal = ExtResource( 15 )
 custom_fonts/font = SubResource( 38 )
 custom_colors/font_color = Color( 1, 1, 1, 1 )
 custom_colors/font_color_hover = Color( 1, 1, 1, 1 )
@@ -566,8 +577,8 @@ margin_left = 400.0
 margin_top = 930.0
 margin_right = 650.0
 margin_bottom = 987.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 47 )
 custom_styles/normal = SubResource( 48 )
 custom_fonts/font = SubResource( 50 )
@@ -581,8 +592,8 @@ margin_left = 980.0
 margin_top = 920.0
 margin_right = 1230.0
 margin_bottom = 977.0
-custom_styles/hover = ExtResource( 12 )
-custom_styles/pressed = ExtResource( 12 )
+custom_styles/hover = ExtResource( 14 )
+custom_styles/pressed = ExtResource( 14 )
 custom_styles/focus = SubResource( 47 )
 custom_styles/normal = SubResource( 48 )
 custom_fonts/font = SubResource( 50 )
@@ -601,7 +612,7 @@ margin_left = 120.0
 margin_top = 930.0
 margin_right = 288.0
 margin_bottom = 983.0
-custom_fonts/font = ExtResource( 11 )
+custom_fonts/font = ExtResource( 13 )
 text = "Loading..."
 
 [node name="begin_load_timer" type="Timer" parent="."]
@@ -609,6 +620,7 @@ wait_time = 0.2
 
 [connection signal="pressed" from="ui/main/play" to="." method="_on_play_pressed"]
 [connection signal="pressed" from="ui/main/settings" to="." method="_on_settings_pressed"]
+[connection signal="pressed" from="ui/main/quit" to="." method="_on_quit_pressed"]
 [connection signal="pressed" from="ui/settings/apply" to="." method="_on_apply_pressed"]
 [connection signal="pressed" from="ui/settings/cancel" to="." method="_on_cancel_pressed"]
 [connection signal="timeout" from="begin_load_timer" to="." method="_on_begin_load_timer_timeout"]

+ 413 - 30
player/bullet.tscn

@@ -1,65 +1,357 @@
-[gd_scene load_steps=14 format=2]
+[gd_scene load_steps=22 format=2]
 
 [ext_resource path="res://player/bullet.gd" type="Script" id=1]
 [ext_resource path="res://player/blue_myst.png" type="Texture" id=2]
 [ext_resource path="res://player/fx_bullet_explodewav.wav" type="AudioStream" id=3]
 
 [sub_resource type="SpatialMaterial" id=1]
+
+render_priority = 0
+flags_transparent = false
+flags_unshaded = false
+flags_vertex_lighting = false
+flags_no_depth_test = false
+flags_use_point_size = false
+flags_world_triplanar = false
+flags_fixed_size = false
+flags_albedo_tex_force_srgb = false
+flags_do_not_receive_shadows = false
+flags_disable_ambient_light = false
+flags_ensure_correct_normals = false
+vertex_color_use_as_albedo = false
+vertex_color_is_srgb = false
+params_diffuse_mode = 0
+params_specular_mode = 0
+params_blend_mode = 0
+params_cull_mode = 0
+params_depth_draw_mode = 0
+params_line_width = 1.0
+params_point_size = 1.0
+params_billboard_mode = 0
+params_billboard_keep_scale = false
+params_grow = false
+params_use_alpha_scissor = false
 albedo_color = Color( 0, 0, 0, 1 )
+metallic = 0.0
+metallic_specular = 0.5
+metallic_texture_channel = 0
 roughness = 0.0
+roughness_texture_channel = 0
 emission_enabled = true
 emission = Color( 0.109804, 0.894118, 1, 1 )
 emission_energy = 7.34
 emission_operator = 0
 emission_on_uv2 = false
+normal_enabled = false
+rim_enabled = false
+clearcoat_enabled = false
+anisotropy_enabled = false
+ao_enabled = false
+depth_enabled = false
+subsurf_scatter_enabled = false
+transmission_enabled = false
+refraction_enabled = false
+detail_enabled = false
+uv1_scale = Vector3( 1, 1, 1 )
+uv1_offset = Vector3( 0, 0, 0 )
+uv1_triplanar = false
+uv1_triplanar_sharpness = 1.0
+uv2_scale = Vector3( 1, 1, 1 )
+uv2_offset = Vector3( 0, 0, 0 )
+uv2_triplanar = false
+uv2_triplanar_sharpness = 1.0
+proximity_fade_enable = false
+distance_fade_enable = false
+_sections_unfolded = [ "Albedo", "Emission", "Flags" ]
 
 [sub_resource type="SphereMesh" id=2]
 
-[sub_resource type="SpatialMaterial" id=3]
+custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
+flip_faces = false
+radius = 1.0
+height = 2.0
+radial_segments = 64
+rings = 32
+is_hemisphere = false
+
+[sub_resource type="Gradient" id=3]
+
+offsets = PoolRealArray( 0, 1 )
+colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 )
+
+[sub_resource type="GradientTexture" id=4]
+
+flags = 4
+gradient = SubResource( 3 )
+width = 2048
+_sections_unfolded = [ "gradient" ]
+
+[sub_resource type="Curve" id=5]
+
+min_value = 0.0
+max_value = 4.0
+bake_resolution = 100
+_data = [ Vector2( 0.150987, 4 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.6936 ), 0.0, 0.0, 0, 0 ]
+
+[sub_resource type="CurveTexture" id=6]
+
+flags = 4
+width = 2048
+curve = SubResource( 5 )
+_sections_unfolded = [ "curve" ]
+
+[sub_resource type="ParticlesMaterial" id=7]
+
+render_priority = 0
+trail_divisor = 1
+emission_shape = 0
+flag_align_y = false
+flag_rotate_y = false
+flag_disable_z = false
+spread = 180.0
+flatness = 0.0
+gravity = Vector3( 0, -1, 0 )
+initial_velocity = 1.0
+initial_velocity_random = 0.0
+angular_velocity = 0.0
+angular_velocity_random = 0.0
+linear_accel = 0.0
+linear_accel_random = 0.0
+radial_accel = 0.0
+radial_accel_random = 0.0
+tangential_accel = 0.0
+tangential_accel_random = 0.0
+damping = 0.0
+damping_random = 0.0
+angle = 0.0
+angle_random = 0.0
+scale = 0.1
+scale_random = 0.0
+scale_curve = SubResource( 6 )
+color_ramp = SubResource( 4 )
+hue_variation = 0.0
+hue_variation_random = 0.0
+anim_speed = 0.0
+anim_speed_random = 0.0
+anim_offset = 0.0
+anim_offset_random = 0.0
+anim_loop = false
+_sections_unfolded = [ "Gravity", "Initial Velocity", "Scale", "Spread", "scale_curve" ]
+
+[sub_resource type="SpatialMaterial" id=8]
+
+render_priority = 0
 flags_transparent = true
+flags_unshaded = false
+flags_vertex_lighting = false
+flags_no_depth_test = false
+flags_use_point_size = false
+flags_world_triplanar = false
+flags_fixed_size = false
+flags_albedo_tex_force_srgb = false
+flags_do_not_receive_shadows = false
+flags_disable_ambient_light = false
+flags_ensure_correct_normals = false
 vertex_color_use_as_albedo = true
 vertex_color_is_srgb = true
+params_diffuse_mode = 0
+params_specular_mode = 0
+params_blend_mode = 0
+params_cull_mode = 0
+params_depth_draw_mode = 0
+params_line_width = 1.0
+params_point_size = 1.0
+params_billboard_mode = 0
+params_billboard_keep_scale = false
+params_grow = false
+params_use_alpha_scissor = false
+albedo_color = Color( 1, 1, 1, 1 )
+metallic = 0.0
+metallic_specular = 0.5
+metallic_texture_channel = 0
 roughness = 0.0
+roughness_texture_channel = 0
 emission_enabled = true
 emission = Color( 0, 0.929412, 1, 1 )
 emission_energy = 2.0
 emission_operator = 0
 emission_on_uv2 = false
+normal_enabled = false
+rim_enabled = false
+clearcoat_enabled = false
+anisotropy_enabled = false
+ao_enabled = false
+depth_enabled = false
+subsurf_scatter_enabled = false
+transmission_enabled = false
+refraction_enabled = false
+detail_enabled = false
+uv1_scale = Vector3( 1, 1, 1 )
+uv1_offset = Vector3( 0, 0, 0 )
+uv1_triplanar = false
+uv1_triplanar_sharpness = 1.0
+uv2_scale = Vector3( 1, 1, 1 )
+uv2_offset = Vector3( 0, 0, 0 )
+uv2_triplanar = false
+uv2_triplanar_sharpness = 1.0
+proximity_fade_enable = false
+distance_fade_enable = false
+_sections_unfolded = [ "Emission", "Flags", "Vertex Color" ]
+
+[sub_resource type="SphereMesh" id=9]
 
-[sub_resource type="SphereMesh" id=4]
-material = SubResource( 3 )
+material = SubResource( 8 )
+custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
+flip_faces = false
 radius = 0.1
 height = 0.2
+radial_segments = 64
+rings = 32
+is_hemisphere = false
+_sections_unfolded = [ "material" ]
 
-[sub_resource type="Gradient" id=5]
-colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 )
+[sub_resource type="SphereShape" id=10]
 
-[sub_resource type="SphereShape" id=6]
 radius = 0.170413
 
-[sub_resource type="SpatialMaterial" id=7]
+[sub_resource type="Gradient" id=11]
+
+offsets = PoolRealArray( 0, 1 )
+colors = PoolColorArray( 1, 1, 1, 0.961538, 0.960784, 0.960784, 0.960784, 0 )
+
+[sub_resource type="GradientTexture" id=12]
+
+flags = 4
+gradient = SubResource( 11 )
+width = 2048
+_sections_unfolded = [ "gradient" ]
+
+[sub_resource type="Curve" id=13]
+
+min_value = 0.0
+max_value = 2.0
+bake_resolution = 100
+_data = [ Vector2( 0, 0.3856 ), 0.0, 0.0, 0, 0, Vector2( 0.0612366, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.999703, 1.4752 ), 0.0, 0.0, 0, 0 ]
+
+[sub_resource type="CurveTexture" id=14]
+
+flags = 4
+width = 2048
+curve = SubResource( 13 )
+
+[sub_resource type="ParticlesMaterial" id=15]
+
+render_priority = 0
+trail_divisor = 1
+emission_shape = 0
+flag_align_y = false
+flag_rotate_y = false
+flag_disable_z = false
+spread = 180.0
+flatness = 0.0
+gravity = Vector3( 0, 0, 0 )
+initial_velocity = 0.3
+initial_velocity_random = 0.0
+angular_velocity = 35.2
+angular_velocity_random = 1.0
+linear_accel = 0.0
+linear_accel_random = 0.0
+radial_accel = 0.0
+radial_accel_random = 0.0
+tangential_accel = 0.0
+tangential_accel_random = 0.0
+damping = 0.0
+damping_random = 0.0
+angle = 0.0
+angle_random = 0.0
+scale = 4.0
+scale_random = 0.0
+scale_curve = SubResource( 14 )
+color_ramp = SubResource( 12 )
+hue_variation = 0.0
+hue_variation_random = 0.0
+anim_speed = 0.0
+anim_speed_random = 0.0
+anim_offset = 0.0
+anim_offset_random = 0.0
+anim_loop = false
+_sections_unfolded = [ "Angular Velocity", "Gravity", "Initial Velocity", "Scale", "Spread", "scale_curve" ]
+
+[sub_resource type="SpatialMaterial" id=16]
+
+render_priority = 0
 flags_transparent = true
 flags_unshaded = true
+flags_vertex_lighting = false
+flags_no_depth_test = false
+flags_use_point_size = false
+flags_world_triplanar = false
+flags_fixed_size = false
+flags_albedo_tex_force_srgb = false
+flags_do_not_receive_shadows = false
+flags_disable_ambient_light = false
+flags_ensure_correct_normals = false
 vertex_color_use_as_albedo = true
 vertex_color_is_srgb = true
+params_diffuse_mode = 0
+params_specular_mode = 0
 params_blend_mode = 1
+params_cull_mode = 0
+params_depth_draw_mode = 0
+params_line_width = 1.0
+params_point_size = 1.0
 params_billboard_mode = 3
+params_billboard_keep_scale = false
+params_grow = false
+params_use_alpha_scissor = false
 particles_anim_h_frames = 1
 particles_anim_v_frames = 1
-particles_anim_loop = false
+particles_anim_loop = 0
+albedo_color = Color( 1, 1, 1, 1 )
 albedo_texture = ExtResource( 2 )
+metallic = 0.0
+metallic_specular = 0.5
+metallic_texture_channel = 0
+roughness = 0.0
+roughness_texture_channel = 0
+emission_enabled = false
+normal_enabled = false
+rim_enabled = false
+clearcoat_enabled = false
+anisotropy_enabled = false
+ao_enabled = false
+depth_enabled = false
+subsurf_scatter_enabled = false
+transmission_enabled = false
+refraction_enabled = false
+detail_enabled = false
+uv1_scale = Vector3( 1, 1, 1 )
+uv1_offset = Vector3( 0, 0, 0 )
+uv1_triplanar = false
+uv1_triplanar_sharpness = 1.0
+uv2_scale = Vector3( 1, 1, 1 )
+uv2_offset = Vector3( 0, 0, 0 )
+uv2_triplanar = false
+uv2_triplanar_sharpness = 1.0
 proximity_fade_enable = true
 proximity_fade_distance = 0.2
+distance_fade_enable = false
+_sections_unfolded = [ "Albedo", "Distance Fade", "Flags", "Parameters", "Proximity Fade", "Vertex Color" ]
 
-[sub_resource type="QuadMesh" id=8]
-material = SubResource( 7 )
+[sub_resource type="QuadMesh" id=17]
 
-[sub_resource type="Gradient" id=9]
-colors = PoolColorArray( 1, 1, 1, 0.961538, 0.960784, 0.960784, 0.960784, 0 )
+material = SubResource( 16 )
+custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
+flip_faces = false
+size = Vector2( 1, 1 )
+_sections_unfolded = [ "material" ]
+
+[sub_resource type="Animation" id=18]
 
-[sub_resource type="Animation" id=10]
 resource_name = "explode"
 length = 3.0
+loop = false
+step = 0.1
 tracks/0/type = "value"
 tracks/0/path = NodePath("explosion:emitting")
 tracks/0/interp = 1
@@ -136,51 +428,142 @@ tracks/5/keys = {
 }
 
 [node name="bullet" type="KinematicBody"]
+input_ray_pickable = true
+input_capture_on_drag = false
+collision_layer = 1
+collision_mask = 1
+move_lock_x = false
+move_lock_y = false
+move_lock_z = false
+collision/safe_margin = 0.001
 script = ExtResource( 1 )
 
 [node name="MeshInstance" type="MeshInstance" parent="."]
 transform = Transform( 0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, 0, 0 )
+layers = 1
 material_override = SubResource( 1 )
+cast_shadow = 1
+extra_cull_margin = 0.0
+use_in_baked_light = false
+lod_min_distance = 0.0
+lod_min_hysteresis = 0.0
+lod_max_distance = 0.0
+lod_max_hysteresis = 0.0
 mesh = SubResource( 2 )
+skeleton = NodePath("..")
 material/0 = null
+_sections_unfolded = [ "Geometry", "Transform", "Visibility", "material_override" ]
 
-[node name="Particles" type="CPUParticles" parent="."]
+[node name="Particles" type="Particles" parent="."]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00988865, 0, 0 )
+layers = 1
+material_override = null
+cast_shadow = 1
+extra_cull_margin = 0.0
+use_in_baked_light = false
+lod_min_distance = 0.0
+lod_min_hysteresis = 0.0
+lod_max_distance = 0.0
+lod_max_hysteresis = 0.0
+emitting = true
 amount = 100
 lifetime = 0.3
+one_shot = false
+preprocess = 0.0
+speed_scale = 1.0
+explosiveness = 0.0
+randomness = 0.0
+fixed_fps = 0
+fract_delta = true
+visibility_aabb = AABB( -4, -4, -4, 8, 8, 8 )
 local_coords = false
-mesh = SubResource( 4 )
-spread = 180.0
-gravity = Vector3( 0, -1, 0 )
-angular_velocity = 0.0
-color_ramp = SubResource( 5 )
+draw_order = 0
+process_material = SubResource( 7 )
+draw_passes = 1
+draw_pass_1 = SubResource( 9 )
+_sections_unfolded = [ "Draw Passes", "Drawing", "Geometry", "Process Material", "Time", "process_material" ]
 
 [node name="OmniLight" type="OmniLight" parent="."]
+layers = 1
 light_color = Color( 0, 1, 0.952941, 1 )
 light_energy = 1.5
+light_indirect_energy = 1.0
+light_negative = false
+light_specular = 0.5
+light_bake_mode = 1
+light_cull_mask = -1
 shadow_enabled = true
+shadow_color = Color( 0, 0, 0, 1 )
+shadow_bias = 0.15
+shadow_contact = 0.0
+shadow_reverse_cull_face = false
+editor_only = false
 omni_range = 9.30146
+omni_attenuation = 1.0
 omni_shadow_mode = 0
+omni_shadow_detail = 1
+_sections_unfolded = [ "Light", "Omni", "Shadow" ]
 
 [node name="CollisionShape" type="CollisionShape" parent="."]
-shape = SubResource( 6 )
+shape = SubResource( 10 )
+disabled = false
 
-[node name="explosion" type="CPUParticles" parent="."]
+[node name="explosion" type="Particles" parent="."]
 transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.452378, 0 )
+layers = 1
+material_override = null
+cast_shadow = 1
+extra_cull_margin = 0.0
+use_in_baked_light = false
+lod_min_distance = 0.0
+lod_min_hysteresis = 0.0
+lod_max_distance = 0.0
+lod_max_hysteresis = 0.0
 emitting = false
+amount = 8
+lifetime = 1.0
+one_shot = false
+preprocess = 0.0
+speed_scale = 1.0
 explosiveness = 1.0
-mesh = SubResource( 8 )
-spread = 180.0
-gravity = Vector3( 0, 0, 0 )
-initial_velocity = 0.3
-angular_velocity = 35.2
-angular_velocity_random = 1.0
-color_ramp = SubResource( 9 )
+randomness = 0.0
+fixed_fps = 0
+fract_delta = true
+visibility_aabb = AABB( -4, -4, -4, 8, 8, 8 )
+local_coords = true
+draw_order = 0
+process_material = SubResource( 15 )
+draw_passes = 1
+draw_pass_1 = SubResource( 17 )
+_sections_unfolded = [ "Draw Passes", "Process Material", "draw_pass_1", "process_material" ]
 
 [node name="anim" type="AnimationPlayer" parent="."]
-anims/explode = SubResource( 10 )
+root_node = NodePath("..")
+autoplay = ""
+playback_process_mode = 1
+playback_default_blend_time = 0.0
+playback_speed = 1.0
+anims/explode = SubResource( 18 )
+blend_times = [  ]
+_sections_unfolded = [ "Playback Options" ]
 
 [node name="explosion2" type="AudioStreamPlayer3D" parent="."]
 stream = ExtResource( 3 )
+attenuation_model = 0
+unit_db = 0.0
 unit_size = 20.0
+max_db = 3.0
+pitch_scale = 1.0
+autoplay = false
+stream_paused = false
+max_distance = 0.0
+out_of_range_mode = 0
+bus = "Master"
+area_mask = 1
+emission_angle_enabled = false
+emission_angle_degrees = 45.0
+emission_angle_filter_attenuation_db = -12.0
+attenuation_filter_cutoff_hz = 5000.0
+attenuation_filter_db = -24.0
+doppler_tracking = 0
 

+ 4 - 1
player/player.gd

@@ -33,6 +33,9 @@ func _input(event):
 		camera_x_rot = clamp(camera_x_rot + event.relative.y * CAMERA_ROTATION_SPEED,deg2rad(CAMERA_X_ROT_MIN), deg2rad(CAMERA_X_ROT_MAX) )
 		$camera_base/camera_rot.rotation.x =  camera_x_rot
 
+	if event.is_action_pressed("quit"):
+		get_tree().quit()
+
 func _ready():
 	#pre initialize orientation transform	
 	orientation=$"Scene Root".global_transform
@@ -179,4 +182,4 @@ func _physics_process(delta):
 	
 	
 func _init():
-	Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
+	Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

+ 6 - 0
project.godot

@@ -27,6 +27,7 @@ settings="*res://menu/settings.gd"
 
 window/size/width=1920
 window/size/height=1080
+window/size/fullscreen=true
 window/stretch/mode="2d"
 window/stretch/aspect="keep_width"
 
@@ -141,6 +142,11 @@ shoot={
 "events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null)
  ]
 }
+quit={
+"deadzone": 0.5,
+"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
+ ]
+}
 
 [physics]