diff --git a/Godot-space Shooter.csproj b/Godot-space Shooter.csproj index 1ac13b1..9d3fa14 100644 --- a/Godot-space Shooter.csproj +++ b/Godot-space Shooter.csproj @@ -1,6 +1,10 @@ - + - net6.0 + net8.0 true + GodotspaceShooter + + + \ No newline at end of file diff --git a/Godot-space Shooter.csproj.old.5 b/Godot-space Shooter.csproj.old.5 index 1ac13b1..da29594 100644 --- a/Godot-space Shooter.csproj.old.5 +++ b/Godot-space Shooter.csproj.old.5 @@ -1,6 +1,10 @@ - + - net6.0 + net8.0 true + GodotspaceShooter + + + \ No newline at end of file diff --git a/Godot-space Shooter.sln b/Godot-space Shooter.sln index 896aa9b..5b844cf 100644 --- a/Godot-space Shooter.sln +++ b/Godot-space Shooter.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Godot-space Shooter", "Godot-space Shooter.csproj", "{240DDE4D-DBD7-403E-B52D-F5962748425A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Godot-space Shooter", "Godot-space Shooter.csproj", "{EDAECF90-1BC3-4D10-849B-57165567D656}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,11 +9,11 @@ Global ExportRelease|Any CPU = ExportRelease|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {240DDE4D-DBD7-403E-B52D-F5962748425A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {240DDE4D-DBD7-403E-B52D-F5962748425A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {240DDE4D-DBD7-403E-B52D-F5962748425A}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU - {240DDE4D-DBD7-403E-B52D-F5962748425A}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU - {240DDE4D-DBD7-403E-B52D-F5962748425A}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU - {240DDE4D-DBD7-403E-B52D-F5962748425A}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + {EDAECF90-1BC3-4D10-849B-57165567D656}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDAECF90-1BC3-4D10-849B-57165567D656}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDAECF90-1BC3-4D10-849B-57165567D656}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {EDAECF90-1BC3-4D10-849B-57165567D656}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {EDAECF90-1BC3-4D10-849B-57165567D656}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {EDAECF90-1BC3-4D10-849B-57165567D656}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU EndGlobalSection EndGlobal diff --git a/Godot-space Shooter.sln.DotSettings.user b/Godot-space Shooter.sln.DotSettings.user new file mode 100644 index 0000000..0e57695 --- /dev/null +++ b/Godot-space Shooter.sln.DotSettings.user @@ -0,0 +1,3 @@ + + ForceIncluded + ExplicitlyExcluded \ No newline at end of file diff --git a/Images/flair_disabled_cross.png b/Images/flair_disabled_cross.png new file mode 100644 index 0000000..064807f Binary files /dev/null and b/Images/flair_disabled_cross.png differ diff --git a/Images/flair_disabled_cross.png.import b/Images/flair_disabled_cross.png.import new file mode 100644 index 0000000..735514f --- /dev/null +++ b/Images/flair_disabled_cross.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b3ucjch8b7rve" +path="res://.godot/imported/flair_disabled_cross.png-3df80847240f401e9a98a70fda1aee83.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/flair_disabled_cross.png" +dest_files=["res://.godot/imported/flair_disabled_cross.png-3df80847240f401e9a98a70fda1aee83.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/genericItem_color_087.png b/Images/genericItem_color_087.png new file mode 100644 index 0000000..2f118aa Binary files /dev/null and b/Images/genericItem_color_087.png differ diff --git a/Images/genericItem_color_087.png.import b/Images/genericItem_color_087.png.import new file mode 100644 index 0000000..f63d8e5 --- /dev/null +++ b/Images/genericItem_color_087.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://5lrd2y05neel" +path="res://.godot/imported/genericItem_color_087.png-6687afb309b9ba66de3b8f9ed90efe28.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/genericItem_color_087.png" +dest_files=["res://.godot/imported/genericItem_color_087.png-6687afb309b9ba66de3b8f9ed90efe28.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/genericItem_white_102.png b/Images/genericItem_white_102.png new file mode 100644 index 0000000..2f4f833 Binary files /dev/null and b/Images/genericItem_white_102.png differ diff --git a/Images/genericItem_white_102.png.import b/Images/genericItem_white_102.png.import new file mode 100644 index 0000000..f91a15b --- /dev/null +++ b/Images/genericItem_white_102.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://34r8nb20e6y6" +path="res://.godot/imported/genericItem_white_102.png-95f126e969936aff31870ba984f94cba.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/genericItem_white_102.png" +dest_files=["res://.godot/imported/genericItem_white_102.png-95f126e969936aff31870ba984f94cba.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/generic_arrow_3.png b/Images/generic_arrow_3.png new file mode 100644 index 0000000..badf0e1 Binary files /dev/null and b/Images/generic_arrow_3.png differ diff --git a/Images/generic_arrow_3.png.import b/Images/generic_arrow_3.png.import new file mode 100644 index 0000000..bcdad32 --- /dev/null +++ b/Images/generic_arrow_3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddikd6m3t7prw" +path="res://.godot/imported/generic_arrow_3.png-604ef2420be555018c588cbcb3d8f7c6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/generic_arrow_3.png" +dest_files=["res://.godot/imported/generic_arrow_3.png-604ef2420be555018c588cbcb3d8f7c6.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/generic_arrow_long.png b/Images/generic_arrow_long.png new file mode 100644 index 0000000..ad7b55f Binary files /dev/null and b/Images/generic_arrow_long.png differ diff --git a/Images/generic_arrow_long.png.import b/Images/generic_arrow_long.png.import new file mode 100644 index 0000000..2319863 --- /dev/null +++ b/Images/generic_arrow_long.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bffseflkbu88e" +path="res://.godot/imported/generic_arrow_long.png-9035723ea35dbcfc24e22a18910772a7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/generic_arrow_long.png" +dest_files=["res://.godot/imported/generic_arrow_long.png-9035723ea35dbcfc24e22a18910772a7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/generic_button_circle_fill.png b/Images/generic_button_circle_fill.png new file mode 100644 index 0000000..7cdad82 Binary files /dev/null and b/Images/generic_button_circle_fill.png differ diff --git a/Images/generic_button_circle_fill.png.import b/Images/generic_button_circle_fill.png.import new file mode 100644 index 0000000..13bb598 --- /dev/null +++ b/Images/generic_button_circle_fill.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dru38hr1dwoq8" +path="res://.godot/imported/generic_button_circle_fill.png-2b822fd87779eace62ffa3a06cff92b1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/generic_button_circle_fill.png" +dest_files=["res://.godot/imported/generic_button_circle_fill.png-2b822fd87779eace62ffa3a06cff92b1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/generic_joystick_left.png b/Images/generic_joystick_left.png new file mode 100644 index 0000000..f5a20f1 Binary files /dev/null and b/Images/generic_joystick_left.png differ diff --git a/Images/generic_joystick_left.png.import b/Images/generic_joystick_left.png.import new file mode 100644 index 0000000..b822abd --- /dev/null +++ b/Images/generic_joystick_left.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtjx04y046dsl" +path="res://.godot/imported/generic_joystick_left.png-c24ad01f9de4be994998a95880b0f98d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/generic_joystick_left.png" +dest_files=["res://.godot/imported/generic_joystick_left.png-c24ad01f9de4be994998a95880b0f98d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_a.png b/Images/keyboard_a.png new file mode 100644 index 0000000..d845fa4 Binary files /dev/null and b/Images/keyboard_a.png differ diff --git a/Images/keyboard_a.png.import b/Images/keyboard_a.png.import new file mode 100644 index 0000000..df65424 --- /dev/null +++ b/Images/keyboard_a.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cm7ru4t8ka3jn" +path="res://.godot/imported/keyboard_a.png-55bc9c150629b9f0992abde27a16be9c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_a.png" +dest_files=["res://.godot/imported/keyboard_a.png-55bc9c150629b9f0992abde27a16be9c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_any.png b/Images/keyboard_any.png new file mode 100644 index 0000000..ef26da1 Binary files /dev/null and b/Images/keyboard_any.png differ diff --git a/Images/keyboard_any.png.import b/Images/keyboard_any.png.import new file mode 100644 index 0000000..2e56f52 --- /dev/null +++ b/Images/keyboard_any.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c5tms7y368pit" +path="res://.godot/imported/keyboard_any.png-2a9a0ec0e27526a6030a1d6924359c1a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_any.png" +dest_files=["res://.godot/imported/keyboard_any.png-2a9a0ec0e27526a6030a1d6924359c1a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_arrows.png b/Images/keyboard_arrows.png new file mode 100644 index 0000000..6491f74 Binary files /dev/null and b/Images/keyboard_arrows.png differ diff --git a/Images/keyboard_arrows.png.import b/Images/keyboard_arrows.png.import new file mode 100644 index 0000000..d2c6d75 --- /dev/null +++ b/Images/keyboard_arrows.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c4l1soqbo0rud" +path="res://.godot/imported/keyboard_arrows.png-3f6c0a61ced4c85ebba49ae5cc4a7159.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_arrows.png" +dest_files=["res://.godot/imported/keyboard_arrows.png-3f6c0a61ced4c85ebba49ae5cc4a7159.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_d.png b/Images/keyboard_d.png new file mode 100644 index 0000000..2436d62 Binary files /dev/null and b/Images/keyboard_d.png differ diff --git a/Images/keyboard_d.png.import b/Images/keyboard_d.png.import new file mode 100644 index 0000000..d1c62ee --- /dev/null +++ b/Images/keyboard_d.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://uy20bgblsk4x" +path="res://.godot/imported/keyboard_d.png-895bd164acd04c40e6c184d6e2572823.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_d.png" +dest_files=["res://.godot/imported/keyboard_d.png-895bd164acd04c40e6c184d6e2572823.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_enter.png b/Images/keyboard_enter.png new file mode 100644 index 0000000..d789807 Binary files /dev/null and b/Images/keyboard_enter.png differ diff --git a/Images/keyboard_enter.png.import b/Images/keyboard_enter.png.import new file mode 100644 index 0000000..5719643 --- /dev/null +++ b/Images/keyboard_enter.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dojdjls5b310j" +path="res://.godot/imported/keyboard_enter.png-5856048a4e779616811153cc1f978fcb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_enter.png" +dest_files=["res://.godot/imported/keyboard_enter.png-5856048a4e779616811153cc1f978fcb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_escape.png b/Images/keyboard_escape.png new file mode 100644 index 0000000..968d5bf Binary files /dev/null and b/Images/keyboard_escape.png differ diff --git a/Images/keyboard_escape.png.import b/Images/keyboard_escape.png.import new file mode 100644 index 0000000..0fa21bf --- /dev/null +++ b/Images/keyboard_escape.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dh4l4vkgkjxup" +path="res://.godot/imported/keyboard_escape.png-dba48fc566cf07dae1d84ab68c431966.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_escape.png" +dest_files=["res://.godot/imported/keyboard_escape.png-dba48fc566cf07dae1d84ab68c431966.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_s.png b/Images/keyboard_s.png new file mode 100644 index 0000000..2c16d71 Binary files /dev/null and b/Images/keyboard_s.png differ diff --git a/Images/keyboard_s.png.import b/Images/keyboard_s.png.import new file mode 100644 index 0000000..4395221 --- /dev/null +++ b/Images/keyboard_s.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2n36lnm2f5he" +path="res://.godot/imported/keyboard_s.png-5dc221fc8896155dff9a7e0fe05624ee.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_s.png" +dest_files=["res://.godot/imported/keyboard_s.png-5dc221fc8896155dff9a7e0fe05624ee.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_space.png b/Images/keyboard_space.png new file mode 100644 index 0000000..8de87a4 Binary files /dev/null and b/Images/keyboard_space.png differ diff --git a/Images/keyboard_space.png.import b/Images/keyboard_space.png.import new file mode 100644 index 0000000..e6a2013 --- /dev/null +++ b/Images/keyboard_space.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dkc2vx71bnhdh" +path="res://.godot/imported/keyboard_space.png-d31aec3c784ba7fccaaf4975d2bf5a49.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_space.png" +dest_files=["res://.godot/imported/keyboard_space.png-d31aec3c784ba7fccaaf4975d2bf5a49.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/keyboard_w.png b/Images/keyboard_w.png new file mode 100644 index 0000000..c79a453 Binary files /dev/null and b/Images/keyboard_w.png differ diff --git a/Images/keyboard_w.png.import b/Images/keyboard_w.png.import new file mode 100644 index 0000000..3eb5562 --- /dev/null +++ b/Images/keyboard_w.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bnh0rcsf30nrm" +path="res://.godot/imported/keyboard_w.png-48cdec668906ea6e1ec6fa0e40447b2b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Images/keyboard_w.png" +dest_files=["res://.godot/imported/keyboard_w.png-48cdec668906ea6e1ec6fa0e40447b2b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Images/restart.svg b/Images/restart.svg deleted file mode 100644 index 6626f25..0000000 --- a/Images/restart.svg +++ /dev/null @@ -1 +0,0 @@ -Created by Luis Rodriguesfrom the Noun Project \ No newline at end of file diff --git a/Material/lblSettingsCountdown.tres b/Material/lblSettingsCountdown.tres new file mode 100644 index 0000000..ae116c5 --- /dev/null +++ b/Material/lblSettingsCountdown.tres @@ -0,0 +1,8 @@ +[gd_resource type="LabelSettings" format=3 uid="uid://cdqcuhuk1yclm"] + +[resource] +font_size = 200 +outline_size = 5 +outline_color = Color(1, 1, 0, 1) +shadow_size = 10 +shadow_offset = Vector2(5, 5) diff --git a/Meshes/asteroid_01.mesh b/Meshes/asteroid_01.mesh index 9b36a59..54f557e 100644 Binary files a/Meshes/asteroid_01.mesh and b/Meshes/asteroid_01.mesh differ diff --git a/Meshes/asteroid_02.mesh b/Meshes/asteroid_02.mesh index 1b09762..8982566 100644 Binary files a/Meshes/asteroid_02.mesh and b/Meshes/asteroid_02.mesh differ diff --git a/Meshes/asteroid_03.mesh b/Meshes/asteroid_03.mesh index cbd619e..ce3fc94 100644 Binary files a/Meshes/asteroid_03.mesh and b/Meshes/asteroid_03.mesh differ diff --git a/Packed-Scenes/PlayerShip.tscn b/Packed-Scenes/PlayerShip.tscn index 4e3ff9e..14d153c 100644 --- a/Packed-Scenes/PlayerShip.tscn +++ b/Packed-Scenes/PlayerShip.tscn @@ -11,17 +11,14 @@ [sub_resource type="SphereShape3D" id="SphereShape3D_330dr"] radius = 0.9 -[node name="PlayerShip" type="Node3D" node_paths=PackedStringArray("cpulaser", "gpulaser", "jet", "PlayerRb", "shots", "healthBar")] +[node name="PlayerShip" type="Node3D" node_paths=PackedStringArray("jet", "rbPlayer", "shots")] transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74227e-08, 0, -1, 0, 0, 0) script = ExtResource("1_cpbf1") -cpulaser = NodePath("") explosion = ExtResource("2_13dyf") -gpulaser = NodePath("") jet = NodePath("RigidBody3D/Jet") laser = ExtResource("9_kbdnc") -PlayerRb = NodePath("RigidBody3D") +rbPlayer = NodePath("RigidBody3D") shots = NodePath("Shots") -healthBar = NodePath("ProgressBar") [node name="RigidBody3D" type="RigidBody3D" parent="."] mass = 100.0 @@ -54,23 +51,3 @@ texture = ExtResource("4_87x8f") current = true [node name="Shots" type="Node3D" parent="."] - -[node name="ProgressBar" type="ProgressBar" parent="."] -anchors_preset = 7 -anchor_left = 0.5 -anchor_top = 1.0 -anchor_right = 0.5 -anchor_bottom = 1.0 -offset_left = -238.0 -offset_top = -1241.0 -offset_right = 251.0 -offset_bottom = -1214.0 -grow_horizontal = 2 -grow_vertical = 0 -size_flags_horizontal = 4 -size_flags_vertical = 8 -max_value = 10.0 -step = 1.0 -value = 7.0 -rounded = true -show_percentage = false diff --git a/Scenes/SpaceShooter.tscn b/Scenes/SpaceShooter.tscn index a25b8de..c531b72 100644 --- a/Scenes/SpaceShooter.tscn +++ b/Scenes/SpaceShooter.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=19 format=3 uid="uid://det8556rpxhbv"] +[gd_scene load_steps=39 format=3 uid="uid://det8556rpxhbv"] [ext_resource type="PackedScene" uid="uid://tlr55u0gn20l" path="res://Packed-Scenes/PlayerShip.tscn" id="1_njb5h"] [ext_resource type="Texture2D" uid="uid://cg6n1hh3lj7rn" path="res://Textures/tile_nebula_green_dff.png" id="2_43vix"] @@ -14,10 +14,36 @@ [ext_resource type="AudioStream" uid="uid://bspwjmgsoxkbn" path="res://Sounds/gameover2.wav" id="9_rtdps"] [ext_resource type="AudioStream" uid="uid://dlml6o3xscxqf" path="res://Sounds/weapon_player.wav" id="11_bbedd"] [ext_resource type="Script" path="res://Scripts/GameArea.cs" id="11_p0rh7"] -[ext_resource type="Texture2D" uid="uid://b8gy1u2i0jkyd" path="res://Images/restart.svg" id="15_nxptg"] +[ext_resource type="Script" path="res://Scripts/InputManager.cs" id="15_uovst"] +[ext_resource type="Script" path="res://Scripts/Ui.cs" id="15_xl7yx"] +[ext_resource type="Texture2D" uid="uid://ddikd6m3t7prw" path="res://Images/generic_arrow_3.png" id="17_1t6sc"] +[ext_resource type="Texture2D" uid="uid://dtjx04y046dsl" path="res://Images/generic_joystick_left.png" id="17_q54dq"] +[ext_resource type="Texture2D" uid="uid://dru38hr1dwoq8" path="res://Images/generic_button_circle_fill.png" id="18_8e5pf"] +[ext_resource type="Texture2D" uid="uid://bffseflkbu88e" path="res://Images/generic_arrow_long.png" id="18_b2vca"] +[ext_resource type="Texture2D" uid="uid://5lrd2y05neel" path="res://Images/genericItem_color_087.png" id="18_rfbsj"] +[ext_resource type="Texture2D" uid="uid://c4l1soqbo0rud" path="res://Images/keyboard_arrows.png" id="19_dpw4m"] +[ext_resource type="Texture2D" uid="uid://34r8nb20e6y6" path="res://Images/genericItem_white_102.png" id="19_hyybv"] +[ext_resource type="Texture2D" uid="uid://bnh0rcsf30nrm" path="res://Images/keyboard_w.png" id="20_3aqu5"] +[ext_resource type="Texture2D" uid="uid://b3ucjch8b7rve" path="res://Images/flair_disabled_cross.png" id="21_7mvgi"] +[ext_resource type="Texture2D" uid="uid://cm7ru4t8ka3jn" path="res://Images/keyboard_a.png" id="21_of2rn"] +[ext_resource type="Texture2D" uid="uid://c2n36lnm2f5he" path="res://Images/keyboard_s.png" id="22_1rcux"] +[ext_resource type="Texture2D" uid="uid://uy20bgblsk4x" path="res://Images/keyboard_d.png" id="23_o81a8"] +[ext_resource type="Texture2D" uid="uid://dkc2vx71bnhdh" path="res://Images/keyboard_space.png" id="24_cuten"] +[ext_resource type="Texture2D" uid="uid://dojdjls5b310j" path="res://Images/keyboard_enter.png" id="25_u4r31"] +[ext_resource type="Texture2D" uid="uid://dh4l4vkgkjxup" path="res://Images/keyboard_escape.png" id="26_oxfmw"] +[ext_resource type="LabelSettings" uid="uid://cdqcuhuk1yclm" path="res://Material/lblSettingsCountdown.tres" id="27_0p8jc"] +[ext_resource type="Texture2D" uid="uid://c5tms7y368pit" path="res://Images/keyboard_any.png" id="28_g1v6s"] [sub_resource type="BoxShape3D" id="BoxShape3D_bw288"] +[sub_resource type="LabelSettings" id="LabelSettings_vf3s8"] +font_size = 50 +font_color = Color(0.233592, 0.506913, 1, 1) +outline_size = 3 +outline_color = Color(0, 1, 0.00392157, 1) +shadow_size = 10 +shadow_offset = Vector2(5, 5) + [sub_resource type="InputEventKey" id="InputEventKey_gjrl7"] device = -1 keycode = 4194309 @@ -25,18 +51,34 @@ keycode = 4194309 [sub_resource type="Shortcut" id="Shortcut_soxs4"] events = [SubResource("InputEventKey_gjrl7")] +[sub_resource type="LabelSettings" id="LabelSettings_dqsad"] +font_size = 50 +font_color = Color(1, 0, 0, 1) +outline_size = 3 +outline_color = Color(1, 0.999986, 0.00293482, 1) +shadow_size = 10 +shadow_offset = Vector2(5, 5) + [node name="SpaceShooter" type="Node3D"] +process_mode = 3 -[node name="PlayerShip" parent="." instance=ExtResource("1_njb5h")] +[node name="PlayerShip" parent="." node_paths=PackedStringArray("jet", "rbPlayer", "shots") instance=ExtResource("1_njb5h")] +process_mode = 1 transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74227e-08, 0, -1, 0, 0, 5) +jet = NodePath("RigidBody3D/Jet") +rbPlayer = NodePath("RigidBody3D") +shots = NodePath("Shots") [node name="Camera3D" type="Camera3D" parent="."] +process_mode = 1 transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 8.8, 0) [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +process_mode = 1 transform = Transform3D(1, 0, 0, 0, 0.707106, 0.707106, 0, -0.707106, 0.707106, 10, 10, 10) [node name="Background" type="Sprite3D" parent="."] +process_mode = 1 transform = Transform3D(1.1, 0, 0, 0, -4.80825e-08, -1, 0, 1.1, -4.37114e-08, 0, -0.5, 0) billboard = 1 shaded = true @@ -46,7 +88,11 @@ region_enabled = true region_rect = Rect2(0, 0, 810, 1380) script = ExtResource("3_imgbw") +[node name="Asteroids" type="Node3D" parent="."] +process_mode = 1 + [node name="GameArea" type="Node3D" parent="."] +process_mode = 1 script = ExtResource("11_p0rh7") [node name="Bottom" type="RigidBody3D" parent="GameArea"] @@ -80,6 +126,7 @@ transform = Transform3D(15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0) shape = SubResource("BoxShape3D_bw288") [node name="SoundManager" type="Node" parent="." node_paths=PackedStringArray("backgroundMusic", "gameOverMusic", "asteroidExplosionSound", "playerExplosionSound", "laserSound")] +process_mode = 1 script = ExtResource("8_4ksf0") backgroundMusic = NodePath("BackgroundMusic") gameOverMusic = NodePath("GameOverMusic") @@ -103,118 +150,331 @@ stream = ExtResource("9_rtdps") [node name="LaserSound" type="AudioStreamPlayer3D" parent="SoundManager"] stream = ExtResource("11_bbedd") -[node name="GameManager" type="Node" parent="." node_paths=PackedStringArray("asteroidsContainer", "labelAsteroids", "labelLevel", "labelLifes", "labelNextLevel", "labelPoints", "labelDebug", "labelGameOver", "restartButton", "reachedPointsLabel")] +[node name="GameManager" type="Node" parent="." node_paths=PackedStringArray("asteroidsContainer")] +process_mode = 1 script = ExtResource("9_rsrr5") -debug = false asteroids = Array[PackedScene]([ExtResource("5_do6ba"), ExtResource("6_tqoe7"), ExtResource("7_v6ul2")]) asteroidsContainer = NodePath("../Asteroids") -labelAsteroids = NodePath("../Control/LabelAsteroids") -labelLevel = NodePath("../Control/LabelLevel") -labelLifes = NodePath("../Control/LabelLives") -labelNextLevel = NodePath("../Control/LabelNextLevel") -labelPoints = NodePath("../Control/LabelPoints") -labelDebug = NodePath("../Control/LabelDebug") -labelGameOver = NodePath("../Control/LabelGameOver") -restartButton = NodePath("../Control/RestartButton") -reachedPointsLabel = NodePath("../Control/ReachedPointsLabel") -[node name="Asteroids" type="Node3D" parent="."] +[node name="InputManager" type="Node" parent="."] +process_mode = 3 +script = ExtResource("15_uovst") + +[node name="Ui" type="Node2D" parent="." node_paths=PackedStringArray("lblLevel", "lblPoints", "barHealth", "barLevel", "vBoxGameOver", "lblGameOver", "butGameOverRestart", "lblReachedPoints", "butGameOverExit", "vBoxPause", "buttonResume", "buttonPauseRestart", "butPauseExit", "vBoxCountdown", "lblCountdown", "textAnyKey", "lblAnyKey")] +process_mode = 3 +script = ExtResource("15_xl7yx") +lblLevel = NodePath("HBoxTop/VBoxStats/lblLevel") +lblPoints = NodePath("HBoxTop/VBoxStats/lblPoints") +barHealth = NodePath("HBoxTop/VBoxBars/barHealth") +barLevel = NodePath("HBoxTop/VBoxBars/barProgress") +vBoxGameOver = NodePath("VBoxGameOver") +lblGameOver = NodePath("VBoxGameOver/lblGameOver") +butGameOverRestart = NodePath("VBoxGameOver/butGameOverRestart") +lblReachedPoints = NodePath("VBoxGameOver/lblReachedPoints") +butGameOverExit = NodePath("VBoxGameOver/butGameOverExit") +vBoxPause = NodePath("VBoxPause") +buttonResume = NodePath("VBoxPause/ButtonResume") +buttonPauseRestart = NodePath("VBoxPause/butPauseRestart") +butPauseExit = NodePath("VBoxPause/butPauseExit") +vBoxCountdown = NodePath("VBoxCountdown") +lblCountdown = NodePath("VBoxCountdown/lblCountdown") +textAnyKey = NodePath("VBoxCountdown/textPressKey") +lblAnyKey = NodePath("VBoxCountdown/lblPressKey") + +[node name="HBoxTop" type="HBoxContainer" parent="Ui"] +custom_minimum_size = Vector2(700, 0) +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = 50.0 +offset_top = 50.0 +offset_right = 754.0 +offset_bottom = 104.0 +grow_horizontal = 2 + +[node name="VBoxIconsLevelPoints" type="VBoxContainer" parent="Ui/HBoxTop"] +custom_minimum_size = Vector2(50, 50) +layout_mode = 2 +tooltip_text = "10 / 10" + +[node name="textLevel" type="TextureRect" parent="Ui/HBoxTop/VBoxIconsLevelPoints"] +custom_minimum_size = Vector2(25, 25) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("17_q54dq") +expand_mode = 4 + +[node name="textPoints" type="TextureRect" parent="Ui/HBoxTop/VBoxIconsLevelPoints"] +custom_minimum_size = Vector2(25, 25) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("18_8e5pf") +expand_mode = 4 + +[node name="VBoxStats" type="VBoxContainer" parent="Ui/HBoxTop"] +layout_mode = 2 + +[node name="lblLevel" type="Label" parent="Ui/HBoxTop/VBoxStats"] +layout_mode = 2 +size_flags_vertical = 1 +text = "1" +horizontal_alignment = 2 +vertical_alignment = 1 + +[node name="lblPoints" type="Label" parent="Ui/HBoxTop/VBoxStats"] +layout_mode = 2 +size_flags_vertical = 1 +text = "0" +horizontal_alignment = 2 + +[node name="VBoxIconsLifeLevel" type="VBoxContainer" parent="Ui/HBoxTop"] +custom_minimum_size = Vector2(50, 50) +layout_mode = 2 +tooltip_text = "10 / 10" + +[node name="textLife" type="TextureRect" parent="Ui/HBoxTop/VBoxIconsLifeLevel"] +custom_minimum_size = Vector2(25, 25) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("19_hyybv") +expand_mode = 4 -[node name="Control" type="Control" parent="."] -layout_mode = 3 -anchors_preset = 0 -offset_right = 40.0 -offset_bottom = 40.0 - -[node name="LabelAsteroids" type="RichTextLabel" parent="Control"] -layout_mode = 2 -offset_left = 20.0 -offset_top = 20.0 -offset_right = 260.0 -offset_bottom = 40.0 -text = "Asteroids: 0" -scroll_active = false -shortcut_keys_enabled = false - -[node name="LabelLives" type="RichTextLabel" parent="Control"] -layout_mode = 2 -offset_left = 20.0 -offset_top = 40.0 -offset_right = 260.0 -offset_bottom = 60.0 -text = "Lives: 3" -scroll_active = false -shortcut_keys_enabled = false - -[node name="LabelPoints" type="RichTextLabel" parent="Control"] -layout_mode = 2 -offset_left = 20.0 -offset_top = 60.0 -offset_right = 260.0 -offset_bottom = 80.0 -text = "Points: 0" -scroll_active = false -shortcut_keys_enabled = false - -[node name="LabelLevel" type="RichTextLabel" parent="Control"] -layout_mode = 2 -offset_left = 20.0 -offset_top = 80.0 -offset_right = 260.0 -offset_bottom = 100.0 -text = "Level: 1" -scroll_active = false -shortcut_keys_enabled = false - -[node name="LabelNextLevel" type="RichTextLabel" parent="Control"] -layout_mode = 2 -offset_left = 20.0 -offset_top = 100.0 -offset_right = 260.0 -offset_bottom = 120.0 -text = "Next Level: 10" -scroll_active = false -shortcut_keys_enabled = false - -[node name="LabelDebug" type="RichTextLabel" parent="Control"] -layout_mode = 2 -offset_left = 543.0 -offset_top = 1225.0 -offset_right = 783.0 -offset_bottom = 1245.0 -scale = Vector2(1, 1.88) -bbcode_enabled = true -text = "[right][color=red]Debug[/color][/right]" -scroll_active = false -shortcut_keys_enabled = false - -[node name="LabelGameOver" type="RichTextLabel" parent="Control"] -layout_mode = 2 -offset_left = 12.0 -offset_top = 437.0 -offset_right = 230.0 -offset_bottom = 460.0 -scale = Vector2(3.6, 7.48) -bbcode_enabled = true -text = "[center][shake rate=30 level=10 connected=1][rainbow freq=1.0 sat=0.8 val=0.8]Game Over[/rainbow][/shake][/center]" -scroll_active = false -shortcut_keys_enabled = false - -[node name="RestartButton" type="Button" parent="Control"] -layout_mode = 0 -offset_left = 354.0 -offset_top = 644.0 -offset_right = 462.0 -offset_bottom = 777.0 +[node name="textProgress" type="TextureRect" parent="Ui/HBoxTop/VBoxIconsLifeLevel"] +custom_minimum_size = Vector2(25, 25) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("18_rfbsj") +expand_mode = 4 + +[node name="VBoxBars" type="VBoxContainer" parent="Ui/HBoxTop"] +layout_mode = 2 +size_flags_horizontal = 3 +tooltip_text = "10 / 10" + +[node name="barHealth" type="ProgressBar" parent="Ui/HBoxTop/VBoxBars"] +layout_mode = 2 +size_flags_vertical = 3 +max_value = 10.0 +value = 10.0 +rounded = true +show_percentage = false + +[node name="barProgress" type="ProgressBar" parent="Ui/HBoxTop/VBoxBars"] +layout_mode = 2 +size_flags_vertical = 3 +max_value = 10.0 +value = 10.0 +rounded = true +show_percentage = false + +[node name="VBoxCountdown" type="VBoxContainer" parent="Ui"] +offset_left = 326.0 +offset_top = 429.0 +offset_right = 492.0 +offset_bottom = 797.0 +size_flags_horizontal = 4 +size_flags_vertical = 4 +alignment = 1 + +[node name="lblCountdown" type="Label" parent="Ui/VBoxCountdown"] +visible = false +layout_mode = 2 +size_flags_horizontal = 4 +text = "3" +label_settings = ExtResource("27_0p8jc") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="textPressKey" type="TextureRect" parent="Ui/VBoxCountdown"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +texture = ExtResource("28_g1v6s") +stretch_mode = 2 + +[node name="lblPressKey" type="Label" parent="Ui/VBoxCountdown"] +layout_mode = 2 +size_flags_horizontal = 4 +text = "Press any key to start" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="VBoxPause" type="VBoxContainer" parent="Ui"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = 205.0 +offset_top = 451.0 +offset_right = 613.0 +offset_bottom = 672.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="LabelPause" type="Label" parent="Ui/VBoxPause"] +layout_mode = 2 +text = "Pause" +label_settings = SubResource("LabelSettings_vf3s8") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="ButtonResume" type="Button" parent="Ui/VBoxPause"] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +button_mask = 5 +text = "Resume +" +icon = ExtResource("18_b2vca") + +[node name="butPauseRestart" type="Button" parent="Ui/VBoxPause"] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +button_mask = 5 +shortcut = SubResource("Shortcut_soxs4") +text = "Restart" +icon = ExtResource("17_1t6sc") + +[node name="butPauseExit" type="Button" parent="Ui/VBoxPause"] +process_mode = 3 +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +button_mask = 5 shortcut = SubResource("Shortcut_soxs4") -icon = ExtResource("15_nxptg") -icon_alignment = 1 - -[node name="ReachedPointsLabel" type="RichTextLabel" parent="Control"] -layout_mode = 0 -offset_left = 173.0 -offset_top = 600.0 -offset_right = 652.0 -offset_bottom = 626.0 -bbcode_enabled = true -text = "[center]You have reached level 1 and 0 points![/center]" +text = "Exit" +icon = ExtResource("21_7mvgi") + +[node name="VBoxGameOver" type="VBoxContainer" parent="Ui"] +process_mode = 3 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = 201.0 +offset_top = 451.0 +offset_right = 609.0 +offset_bottom = 749.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="lblGameOver" type="Label" parent="Ui/VBoxGameOver"] +layout_mode = 2 +text = "Game Over" +label_settings = SubResource("LabelSettings_dqsad") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="lblReachedPoints" type="Label" parent="Ui/VBoxGameOver"] +custom_minimum_size = Vector2(0, 100) +layout_mode = 2 +text = "You have reached level 1 and 0 points!" +horizontal_alignment = 1 +vertical_alignment = 1 +autowrap_mode = 3 + +[node name="butGameOverRestart" type="Button" parent="Ui/VBoxGameOver"] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +button_mask = 5 +shortcut = SubResource("Shortcut_soxs4") +text = "Restart" +icon = ExtResource("17_1t6sc") + +[node name="butGameOverExit" type="Button" parent="Ui/VBoxGameOver"] +process_mode = 3 +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 6 +button_mask = 5 +shortcut = SubResource("Shortcut_soxs4") +text = "Exit" +icon = ExtResource("21_7mvgi") + +[node name="BoxHelp" type="BoxContainer" parent="Ui"] +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 633.0 +offset_top = 1064.0 +offset_right = 785.0 +offset_bottom = 1264.0 +grow_horizontal = 0 +grow_vertical = 0 + +[node name="VBoxHelp" type="VBoxContainer" parent="Ui/BoxHelp"] +layout_mode = 2 + +[node name="HBoxMovement" type="HBoxContainer" parent="Ui/BoxHelp/VBoxHelp"] +layout_mode = 2 + +[node name="TextureArrowKeys" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"] +layout_mode = 2 +texture = ExtResource("19_dpw4m") + +[node name="TextureW" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"] +visible = false +layout_mode = 2 +texture = ExtResource("20_3aqu5") + +[node name="TextureA" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"] +visible = false +layout_mode = 2 +texture = ExtResource("21_of2rn") + +[node name="TextureS" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"] +visible = false +layout_mode = 2 +texture = ExtResource("22_1rcux") + +[node name="TextureD" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"] +visible = false +layout_mode = 2 +texture = ExtResource("23_o81a8") + +[node name="lblMovement" type="Label" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"] +layout_mode = 2 +text = "Movement +" + +[node name="HBoxShooting" type="HBoxContainer" parent="Ui/BoxHelp/VBoxHelp"] +layout_mode = 2 + +[node name="TextureSpace" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxShooting"] +layout_mode = 2 +texture = ExtResource("24_cuten") + +[node name="TextureEnter" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxShooting"] +visible = false +layout_mode = 2 +texture = ExtResource("25_u4r31") + +[node name="lblShooting" type="Label" parent="Ui/BoxHelp/VBoxHelp/HBoxShooting"] +layout_mode = 2 +text = "Shooting" + +[node name="HBoxPause" type="HBoxContainer" parent="Ui/BoxHelp/VBoxHelp"] +layout_mode = 2 + +[node name="TexturePause" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxPause"] +layout_mode = 2 +texture = ExtResource("26_oxfmw") + +[node name="lblPause" type="Label" parent="Ui/BoxHelp/VBoxHelp/HBoxPause"] +layout_mode = 2 +text = "Pause" diff --git a/Scripts/Asteroid.cs b/Scripts/Asteroid.cs index 8491e36..acdeec3 100644 --- a/Scripts/Asteroid.cs +++ b/Scripts/Asteroid.cs @@ -1,6 +1,6 @@ using Godot; -namespace Scripts; +namespace GodotspaceShooter.Scripts; [GlobalClass] public partial class Asteroid : Node3D { diff --git a/Scripts/Background.cs b/Scripts/Background.cs index f5d00c3..259420c 100644 --- a/Scripts/Background.cs +++ b/Scripts/Background.cs @@ -1,9 +1,9 @@ using Godot; -namespace Scripts; +namespace GodotspaceShooter.Scripts; public partial class Background : Sprite3D { - [Export] private float moveVelocity = -250f; + private const float moveVelocity = -250f; public override void _Process(double delta) { Rect2 region = RegionRect; diff --git a/Scripts/Explosion.cs b/Scripts/Explosion.cs index e6fe0b6..b707be4 100644 --- a/Scripts/Explosion.cs +++ b/Scripts/Explosion.cs @@ -1,5 +1,7 @@ using Godot; +namespace GodotspaceShooter.Scripts; + public partial class Explosion : GpuParticles3D { public override void _Process(double delta) { if (!Emitting) QueueFree(); diff --git a/Scripts/GameArea.cs b/Scripts/GameArea.cs index a89a95e..88aa1fa 100644 --- a/Scripts/GameArea.cs +++ b/Scripts/GameArea.cs @@ -1,3 +1,5 @@ using Godot; +namespace GodotspaceShooter.Scripts; + public partial class GameArea : Node3D { } \ No newline at end of file diff --git a/Scripts/GameManager.cs b/Scripts/GameManager.cs index 8a41b47..9ee7df2 100644 --- a/Scripts/GameManager.cs +++ b/Scripts/GameManager.cs @@ -1,41 +1,44 @@ +using System; using Godot; using Godot.Collections; -namespace Scripts; +namespace GodotspaceShooter.Scripts; public partial class GameManager : Node { private int asteroidMaxNumber = 3; private int asteroidNumber; - public bool GameOver { get; private set; } - [Export] private bool debug = true; + + private bool gameOver; + public bool GameOver { + get => gameOver; + private set { + gameOver = value; + SoundManager.Instance.Stop(SoundManager.Sound.BackgroundMusic); + SoundManager.Instance.Play(SoundManager.Sound.GameOver); + OnGameOver?.Invoke(this,EventArgs.Empty); + } + } [Export] private Array asteroids; [Export] private Node3D asteroidsContainer; - [Export] private RichTextLabel labelAsteroids; - [Export] private RichTextLabel labelLevel; - [Export] private RichTextLabel labelLifes; - [Export] private RichTextLabel labelNextLevel; - [Export] private RichTextLabel labelPoints; - [Export] private RichTextLabel labelDebug; - [Export] private RichTextLabel labelGameOver; - [Export] private Button restartButton; - [Export] private RichTextLabel reachedPointsLabel; - private int level = 1; public int MaxLives { get; private set; } = 10; private int lives = 10; private int nextLevelPoints = 11; private int points; private float spawnRate = 1f; - private float spawnTimer; - + + public event EventHandler OnRefreshStats; + public event EventHandler OnNewCountdown; + public event EventHandler OnGameOver; + public int AsteroidNumber { get => asteroidNumber; set { asteroidNumber = value; - RefreshUi(); + OnRefreshStats?.Invoke(this, EventArgs.Empty); } } @@ -43,9 +46,8 @@ public partial class GameManager : Node { get => lives; set { lives = value; - if (lives <= 0) SetGameOver(); - RefreshUi(); - PlayerShip.Instance.RefreshUi(); + if (lives <= 0) GameOver = true; + OnRefreshStats?.Invoke(this, EventArgs.Empty); } } @@ -54,7 +56,7 @@ public partial class GameManager : Node { set { points = value; if (points >= nextLevelPoints) NextLevel(); - RefreshUi(); + OnRefreshStats?.Invoke(this, EventArgs.Empty); } } @@ -62,15 +64,17 @@ public partial class GameManager : Node { get => level; private set { level = value; - RefreshUi(); + OnRefreshStats?.Invoke(this, EventArgs.Empty); } } + + public int LastLevelPoints { get; private set; } - private int NextLevelPoints { + public int NextLevelPoints { get => nextLevelPoints; - set { + private set { nextLevelPoints = value; - RefreshUi(); + OnRefreshStats?.Invoke(this, EventArgs.Empty); } } @@ -78,32 +82,50 @@ public partial class GameManager : Node { get => asteroidMaxNumber; set { asteroidMaxNumber = value; - RefreshUi(); + OnRefreshStats?.Invoke(this, EventArgs.Empty); } } - public static GameManager Instance { get; private set; } + private bool gamePaused; + public bool GamePaused{ + get => gamePaused; + set { + gamePaused = value; + GetTree().Paused = gamePaused; + OnRefreshStats?.Invoke(this, EventArgs.Empty); + } + } + private bool countdown; + public bool Countdown { + get => countdown; + set { + countdown = value; + if (countdown) OnNewCountdown?.Invoke(this, EventArgs.Empty); + } + } + + public static GameManager Instance { get; private set; } + [Export] public bool Debug { get; private set; } = true; public override void _Ready() { Instance = this; Lives = MaxLives; spawnTimer = spawnRate; + Countdown = true; SoundManager.Instance.Play(SoundManager.Sound.BackgroundMusic); - restartButton.Pressed += RestartButtonOnPressed; - RefreshUi(); - PlayerShip.Instance.RefreshUi(); } - private void RestartButtonOnPressed() => GetTree().ReloadCurrentScene(); - public override void _Process(double delta) { - spawnTimer -= (float)delta; - if (spawnTimer < 0) { - if (AsteroidNumber < asteroidMaxNumber) SpawnNewAsteroid(); - spawnTimer = spawnRate; + if (!GamePaused && !Countdown) { + spawnTimer -= (float)delta; + if (spawnTimer < 0) { + if (AsteroidNumber < asteroidMaxNumber) SpawnNewAsteroid(); + spawnTimer = spawnRate; + } } } + private void SpawnNewAsteroid() { if (GameOver) return; GD.Print("Spawn new asteroid"); @@ -113,34 +135,12 @@ public partial class GameManager : Node { asteroid.Name = $"Asteroid{AsteroidNumber}"; } - private void RefreshUi() { - labelLifes.Text = $"Lives: {lives}"; - labelAsteroids.Text = $"Asteroids: {asteroidNumber} / {asteroidMaxNumber}"; - labelPoints.Text = $"Points: {points}"; - labelNextLevel.Text = $"Next Level at: {NextLevelPoints}"; - labelLevel.Text = $"Actual Level: {Level}"; - labelDebug.Visible = debug; - labelGameOver.Visible = GameOver; - restartButton.Visible = GameOver; - reachedPointsLabel.Visible = GameOver; - } - private void NextLevel() { - GD.Print("Next Level!"); + Ui.ShowMessage("Next Level!"); Level++; + LastLevelPoints = NextLevelPoints; NextLevelPoints = Level * 33; AsteroidMaxNumber = 3 + Level; spawnRate = 1f - Level * 0.1f; } - - public void OnGameAreaBodyExited(Node body) { - GD.Print($"{body.Name} leaved GameArea!"); - } - - private void SetGameOver() { - GameOver = true; - reachedPointsLabel.Text = $"[center]You have reached level {Level} and {Points} points![/center]"; - SoundManager.Instance.Stop(SoundManager.Sound.BackgroundMusic); - SoundManager.Instance.Play(SoundManager.Sound.GameOver); - } -} \ No newline at end of file +} diff --git a/Scripts/InputManager.cs b/Scripts/InputManager.cs new file mode 100644 index 0000000..b75d4fc --- /dev/null +++ b/Scripts/InputManager.cs @@ -0,0 +1,56 @@ +using System; +using Godot; + +namespace GodotspaceShooter.Scripts; + +public partial class InputManager : Node +{ + private const string GAME_PAUSE = "Game_Pause"; + private const string PLAYER_MOVE_FORWARD = "Player_Move_Forward"; + private const string PLAYER_MOVE_BACKWARDS = "Player_Move_Backwards"; + private const string PLAYER_MOVE_LEFT = "Player_Move_Left"; + private const string PLAYER_MOVE_RIGHT = "Player_Move_Right"; + private const string PLAYER_FIRE = "Player_Fire"; + + private Vector3 moveDirection; + private Vector3 rotationDirection; + + public event EventHandler StartCountdown; + + public static InputManager Instance { get; private set; } + + public override void _Ready() => Instance = this; + + public override void _UnhandledInput(InputEvent @event) { + //Countdown + if (GameManager.Instance.Countdown && Input.IsAnythingPressed()) StartCountdown?.Invoke(this,EventArgs.Empty); + + //Pause + if (Input.IsActionJustReleased(GAME_PAUSE)) GameManager.Instance.GamePaused = GameManager.Instance.GamePaused switch { true => false, false => true }; + + if (GameManager.Instance.GamePaused || GameManager.Instance.Countdown || GameManager.Instance.GameOver) return; + //Movement + float moveVelocity = PlayerShip.Instance.MoveVelocity; + float rotationVelocity = PlayerShip.Instance.RotationVelocity; + + moveDirection = Vector3.Zero; + rotationDirection = Vector3.Zero; + + if (Input.IsActionPressed(PLAYER_MOVE_FORWARD)) moveDirection.Z = -moveVelocity; + if (Input.IsActionJustPressed(PLAYER_MOVE_FORWARD)) rotationDirection.X = -rotationVelocity; + if (Input.IsActionPressed(PLAYER_MOVE_BACKWARDS)) moveDirection.Z = +moveVelocity; + if (Input.IsActionJustPressed(PLAYER_MOVE_BACKWARDS)) rotationDirection.X = +rotationVelocity; + if (Input.IsActionPressed(PLAYER_MOVE_LEFT)) moveDirection.X = -moveVelocity; + if (Input.IsActionJustPressed(PLAYER_MOVE_LEFT)) rotationDirection.Z = -rotationVelocity * 2; + if (Input.IsActionPressed(PLAYER_MOVE_RIGHT)) moveDirection.X = moveVelocity; + if (Input.IsActionJustPressed(PLAYER_MOVE_RIGHT)) rotationDirection.Z = +rotationVelocity * 2; + if (Input.IsActionJustReleased(PLAYER_MOVE_LEFT) || Input.IsActionJustReleased(PLAYER_MOVE_RIGHT)) rotationDirection = Vector3.Zero; + + PlayerShip.Instance.MoveDirection = moveDirection; + PlayerShip.Instance.RotationDirection = rotationDirection; + + //Shooting + if (Input.IsActionJustPressed(PLAYER_FIRE)) PlayerShip.Instance.Shooting = true; + // if (Input.IsActionJustReleased(PLAYER_FIRE)) PlayerShip.Instance.Shooting = false; + } +} \ No newline at end of file diff --git a/Scripts/LaserBeam.cs b/Scripts/LaserBeam.cs index 5a50553..76ef446 100644 --- a/Scripts/LaserBeam.cs +++ b/Scripts/LaserBeam.cs @@ -1,5 +1,7 @@ using Godot; +namespace GodotspaceShooter.Scripts; + public partial class LaserBeam : Node3D { [Export] private RigidBody3D rigidBody; private float speed = 10f; diff --git a/Scripts/PlayerShip.cs b/Scripts/PlayerShip.cs index 81944aa..f4241f6 100644 --- a/Scripts/PlayerShip.cs +++ b/Scripts/PlayerShip.cs @@ -1,34 +1,25 @@ using Godot; -namespace Scripts; +namespace GodotspaceShooter.Scripts; public partial class PlayerShip : Node3D { - private const float jetTimerMax = 0.5f; - - private const float laserTimerMax = 1f; - - private const string PLAYER_MOVE_FORWARD = "Player_Move_Forward"; - private const string PLAYER_MOVE_BACKWARDS = "Player_Move_Backwards"; - private const string PLAYER_MOVE_LEFT = "Player_Move_Left"; - private const string PLAYER_MOVE_RIGHT = "Player_Move_Right"; - private const string PLAYER_FIRE = "Player_Fire"; - [Export] private CpuParticles3D cpulaser; [Export] private PackedScene explosion; - [Export] private GpuParticles3D gpulaser; [Export] private Node3D jet; - private float jetTimer = jetTimerMax; [Export] private PackedScene laser; + [Export] private RigidBody3D rbPlayer; + [Export] private Node3D shots; + + private const float jetTimerMax = 0.5f; + private const float laserTimerMax = 1f; private float laserTimer = laserTimerMax; + private float jetTimer = jetTimerMax; - private Vector3 moveDir; - [Export] private float moveVelocity = 10f; - [Export] public RigidBody3D PlayerRb; - private Vector3 rotDir; - [Export] private float rotVelocity = 15f; - private bool shooting; - [Export] private Node3D shots; + public float MoveVelocity { get; private set; } = 10f; + public float RotationVelocity { get; private set; } = 15f; - [Export] private ProgressBar healthBar; + public Vector3 MoveDirection { get; set; } + public Vector3 RotationDirection { get; set; } + public bool Shooting { get; set; } public static PlayerShip Instance { get; private set; } @@ -37,42 +28,21 @@ public partial class PlayerShip : Node3D { Instance = this; } - public void RefreshUi() { - healthBar.MaxValue = GameManager.Instance.MaxLives; - healthBar.Value = GameManager.Instance.Lives; - } - public override void _Process(double delta) { - if (GameManager.Instance.GameOver) return; - - moveDir = Vector3.Zero; - rotDir = Vector3.Zero; - - //Movement - if (Input.IsActionPressed(PLAYER_MOVE_FORWARD)) moveDir.Z -= moveVelocity; - if (Input.IsActionJustPressed(PLAYER_MOVE_FORWARD)) rotDir.X = -rotVelocity; - if (Input.IsActionPressed(PLAYER_MOVE_BACKWARDS)) moveDir.Z += moveVelocity; - if (Input.IsActionJustPressed(PLAYER_MOVE_BACKWARDS)) rotDir.X = +rotVelocity; - if (Input.IsActionPressed(PLAYER_MOVE_LEFT)) moveDir.X -= moveVelocity; - if (Input.IsActionJustPressed(PLAYER_MOVE_LEFT)) rotDir.Z = -rotVelocity * 2; - if (Input.IsActionPressed(PLAYER_MOVE_RIGHT)) moveDir.X += moveVelocity; - if (Input.IsActionJustPressed(PLAYER_MOVE_RIGHT)) rotDir.Z = +rotVelocity * 2; - if (Input.IsActionJustReleased(PLAYER_MOVE_LEFT) || Input.IsActionJustReleased(PLAYER_MOVE_RIGHT)) rotDir = Vector3.Zero; - - //Fire - if (Input.IsActionJustPressed(PLAYER_FIRE)) + if (Shooting) if (laser.Instantiate() is Node3D shot) { - shot.Position = PlayerRb.Position + new Vector3(0f, 0f, 0.74f); + shot.Position = rbPlayer.Position + new Vector3(0f, 0f, 0.74f); shots.AddChild(shot); - SoundManager.Instance.Play(SoundManager.Sound.Laser, PlayerRb.Position); + SoundManager.Instance.Play(SoundManager.Sound.Laser, rbPlayer.Position); + Shooting = false; } } public override void _PhysicsProcess(double delta) { //Movement - if (moveDir != Vector3.Zero) { + if (MoveDirection != Vector3.Zero) { jet.Visible = true; - KinematicCollision3D collision = PlayerRb.MoveAndCollide(moveDir * (float)delta); + KinematicCollision3D collision = rbPlayer.MoveAndCollide(MoveDirection * (float)delta); if (collision?.GetCollider() is Node3D collider) { Node3D parent = collider.GetParent(); Vector3 collisionPosition = collision.GetPosition(); @@ -92,7 +62,7 @@ public partial class PlayerShip : Node3D { } //Rotation - PlayerRb.RotationDegrees = rotDir; + rbPlayer.RotationDegrees = RotationDirection; } public void Explode(Vector3 collisionPosition) { diff --git a/Scripts/SoundManager.cs b/Scripts/SoundManager.cs index 2b49346..84c2889 100644 --- a/Scripts/SoundManager.cs +++ b/Scripts/SoundManager.cs @@ -2,7 +2,7 @@ using System; using System.Runtime.InteropServices; using Godot; -namespace Scripts; +namespace GodotspaceShooter.Scripts; public partial class SoundManager : Node { [Export] private AudioStreamPlayer backgroundMusic; diff --git a/Scripts/Ui.cs b/Scripts/Ui.cs new file mode 100644 index 0000000..57c600d --- /dev/null +++ b/Scripts/Ui.cs @@ -0,0 +1,115 @@ +using System; +using System.Globalization; +using System.Linq; +using Godot; + +namespace GodotspaceShooter.Scripts; +public partial class Ui : Node2D +{ + [ExportCategory("Stats")] + [Export] private Label lblLevel; + [Export] private Label lblPoints; + [Export] private ProgressBar barHealth; + [Export] private ProgressBar barLevel; + [ExportCategory("GameOver")] + [Export] private VBoxContainer vBoxGameOver; + [Export] private Label lblGameOver; + [Export] private Button butGameOverRestart; + [Export] private Label lblReachedPoints; + [Export] private Button butGameOverExit; + [ExportCategory("Pause")] + [Export] private VBoxContainer vBoxPause; + [Export] private Button buttonResume; + [Export] private Button buttonPauseRestart; + [Export] private Button butPauseExit; + [ExportCategory("Countdown")] + [Export] private VBoxContainer vBoxCountdown; + [Export] private Label lblCountdown; + [Export] private TextureRect textAnyKey; + [Export] private Label lblAnyKey; + + private const double countdownMaxTimer = 3; + private double countdownTimer = countdownMaxTimer; + private bool countdownRunning; + + + public override void _Ready() { + if (GameManager.Instance is null) + GD.PrintErr("No GameManager found!"); + else { + GameManager.Instance.OnRefreshStats += GameManager_RefreshStats; + GameManager.Instance.OnNewCountdown += GameManager_NewCountdown; + GameManager.Instance.OnGameOver += GameManager_GameOver; + InputManager.Instance.StartCountdown += InputManager_StartCountdown; + lblGameOver.Visible = GameManager.Instance.GameOver; + butGameOverRestart.Visible = GameManager.Instance.GameOver; + lblReachedPoints.Visible = GameManager.Instance.GameOver; + butGameOverRestart.Pressed += AllButtonRestartOnPressed; + buttonResume.Pressed += ButtonResumeOnPressed; + buttonPauseRestart.Pressed += AllButtonRestartOnPressed; + butPauseExit.Pressed += AllButExitOnPressed; + butGameOverExit.Pressed += AllButExitOnPressed; + GameManager_RefreshStats(this, EventArgs.Empty); + } + } + + private void AllButExitOnPressed() => GetTree().Quit(); + + private void GameManager_GameOver(object sender, EventArgs e) { + GD.Print($"Game Over! You have reached level {GameManager.Instance.Level} and {GameManager.Instance.Points} points!"); + lblReachedPoints.Text = $"You have reached level {GameManager.Instance.Level} and {GameManager.Instance.Points} points!"; + foreach (CanvasItem canvasItem in vBoxGameOver.GetChildren().Cast()) canvasItem.Visible = true; + vBoxGameOver.Visible = true; + } + + private void InputManager_StartCountdown(object sender, EventArgs e) { + lblAnyKey.Visible = false; + textAnyKey.Visible = false; + lblCountdown.Visible = true; + countdownRunning = true; + } + + private void GameManager_NewCountdown(object sender, EventArgs e) { + lblCountdown.Text = countdownTimer.ToString(CultureInfo.InvariantCulture); + foreach (CanvasItem canvasItem in vBoxCountdown.GetChildren().Cast()) canvasItem.Visible = true; + vBoxCountdown.Visible = true; + lblCountdown.Visible = false; + } + + public override void _Process(double delta) { + if (GameManager.Instance.Countdown && countdownRunning) { + countdownTimer -= delta; + lblCountdown.Text = Mathf.RoundToInt(countdownTimer).ToString(); + if (countdownTimer <= 0) { + foreach (CanvasItem canvasItem in vBoxCountdown.GetChildren().Cast()) canvasItem.Visible = false; + vBoxCountdown.Visible = false; + countdownRunning = false; + GameManager.Instance.Countdown = false; + } + } + } + + private void GameManager_RefreshStats(object sender, EventArgs e) { + lblLevel.Text = $"{GameManager.Instance.Level}"; + lblPoints.Text = $"{GameManager.Instance.Points}"; + + barHealth.MaxValue = GameManager.Instance.MaxLives; + barHealth.Value = GameManager.Instance.Lives; + barHealth.TooltipText = $"{GameManager.Instance.Lives} / {GameManager.Instance.MaxLives}"; + + barLevel.MaxValue = GameManager.Instance.NextLevelPoints; + barLevel.Value = GameManager.Instance.Points - GameManager.Instance.LastLevelPoints; + barLevel.TooltipText = $"{GameManager.Instance.Points} / {GameManager.Instance.NextLevelPoints}"; + + vBoxPause.Visible = GameManager.Instance.GamePaused; + vBoxGameOver.Visible = GameManager.Instance.GameOver; + } + + private static void ButtonResumeOnPressed() => GameManager.Instance.GamePaused = false; + private void AllButtonRestartOnPressed() { + GameManager.Instance.GamePaused = false; + GetTree().ReloadCurrentScene(); + } + + public static void ShowMessage(string message) => GD.Print(message); +} diff --git a/Scripts/generic_arrow_3.svg b/Scripts/generic_arrow_3.svg new file mode 100644 index 0000000..8a2b017 --- /dev/null +++ b/Scripts/generic_arrow_3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Images/restart.svg.import b/Scripts/generic_arrow_3.svg.import similarity index 71% rename from Images/restart.svg.import rename to Scripts/generic_arrow_3.svg.import index 33708bf..9c396fa 100644 --- a/Images/restart.svg.import +++ b/Scripts/generic_arrow_3.svg.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://b8gy1u2i0jkyd" -path="res://.godot/imported/restart.svg-98c792bd948b9b683b245e78c0930bfc.ctex" +uid="uid://d3tkfqng4erhj" +path="res://.godot/imported/generic_arrow_3.svg-b4290a859159fb8c7b12bda0e7002f2e.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Images/restart.svg" -dest_files=["res://.godot/imported/restart.svg-98c792bd948b9b683b245e78c0930bfc.ctex"] +source_file="res://Scripts/generic_arrow_3.svg" +dest_files=["res://.godot/imported/generic_arrow_3.svg-b4290a859159fb8c7b12bda0e7002f2e.ctex"] [params] diff --git a/export_presets.cfg b/export_presets.cfg index a1fc08c..6d6f15b 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -40,3 +40,69 @@ rm -rf \"{temp_dir}\"" dotnet/include_scripts_content=false dotnet/include_debug_symbols=true dotnet/embed_build_outputs=false + +[preset.1] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/architecture="x86_64" +codesign/enable=false +codesign/timestamp=true +codesign/timestamp_server_url="" +codesign/digest_algorithm=1 +codesign/description="" +codesign/custom_options=PackedStringArray() +application/modify_resources=true +application/icon="" +application/console_wrapper_icon="" +application/icon_interpolation=4 +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="" +application/file_description="" +application/copyright="" +application/trademarks="" +application/export_angle=0 +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}' +$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}' +$trigger = New-ScheduledTaskTrigger -Once -At 00:00 +$settings = New-ScheduledTaskSettingsSet +$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings +Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true +Start-ScheduledTask -TaskName godot_remote_debug +while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 } +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue" +ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue +Remove-Item -Recurse -Force '{temp_dir}'" +dotnet/include_scripts_content=false +dotnet/include_debug_symbols=true +dotnet/embed_build_outputs=false diff --git a/project.godot b/project.godot index 3ae0934..49f035e 100644 --- a/project.godot +++ b/project.godot @@ -13,7 +13,7 @@ config_version=5 config/name="Space Shooter" config/version="0.1" run/main_scene="res://Scenes/SpaceShooter.tscn" -config/features=PackedStringArray("4.2", "C#", "Forward Plus") +config/features=PackedStringArray("4.3", "C#") boot_splash/image="res://Images/GodotSplashScreen.png" config/icon="res://Images/Space-Shooter.png" @@ -63,3 +63,10 @@ Player_Fire={ , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":false,"script":null) ] } +Game_Pause={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194313,"key_label":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":6,"pressure":0.0,"pressed":false,"script":null) +] +}