commit c266d22f58eb5891565d969a9077dfc3e4a142c8 Author: Фёдор Веселов Date: Sun Sep 8 00:45:50 2024 +0500 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb8a8d9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Godot 4+ specific ignores +.godot/ +.vs/ +/android/ diff --git a/NewLON.csproj b/NewLON.csproj new file mode 100644 index 0000000..53cc1f1 --- /dev/null +++ b/NewLON.csproj @@ -0,0 +1,8 @@ + + + net6.0 + net7.0 + net8.0 + true + + \ No newline at end of file diff --git a/NewLON.sln b/NewLON.sln new file mode 100644 index 0000000..0b547c7 --- /dev/null +++ b/NewLON.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NewLON", "NewLON.csproj", "{9FFA6489-F73F-4493-8D9C-888092D73A4D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + ExportDebug|Any CPU = ExportDebug|Any CPU + ExportRelease|Any CPU = ExportRelease|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9FFA6489-F73F-4493-8D9C-888092D73A4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FFA6489-F73F-4493-8D9C-888092D73A4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FFA6489-F73F-4493-8D9C-888092D73A4D}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {9FFA6489-F73F-4493-8D9C-888092D73A4D}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {9FFA6489-F73F-4493-8D9C-888092D73A4D}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {9FFA6489-F73F-4493-8D9C-888092D73A4D}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/assets/sprites/atlases/atlas1.png b/assets/sprites/atlases/atlas1.png new file mode 100644 index 0000000..0f864d2 Binary files /dev/null and b/assets/sprites/atlases/atlas1.png differ diff --git a/assets/sprites/atlases/atlas1.png.import b/assets/sprites/atlases/atlas1.png.import new file mode 100644 index 0000000..0638fc7 --- /dev/null +++ b/assets/sprites/atlases/atlas1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dvldjlg0nr355" +path="res://.godot/imported/atlas1.png-d9b0e26b17d461e6bb422d603802b67a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/atlas1.png" +dest_files=["res://.godot/imported/atlas1.png-d9b0e26b17d461e6bb422d603802b67a.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/assets/sprites/atlases/cursor/default_arrow.png b/assets/sprites/atlases/cursor/default_arrow.png new file mode 100644 index 0000000..0dc6fba Binary files /dev/null and b/assets/sprites/atlases/cursor/default_arrow.png differ diff --git a/assets/sprites/atlases/cursor/default_arrow.png.import b/assets/sprites/atlases/cursor/default_arrow.png.import new file mode 100644 index 0000000..b2e2c90 --- /dev/null +++ b/assets/sprites/atlases/cursor/default_arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c20dwjohaljdk" +path="res://.godot/imported/default_arrow.png-1f28ab8cea591f4487d681c783ed6548.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/cursor/default_arrow.png" +dest_files=["res://.godot/imported/default_arrow.png-1f28ab8cea591f4487d681c783ed6548.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/assets/sprites/atlases/cursor/default_point.png b/assets/sprites/atlases/cursor/default_point.png new file mode 100644 index 0000000..dcbec00 Binary files /dev/null and b/assets/sprites/atlases/cursor/default_point.png differ diff --git a/assets/sprites/atlases/cursor/default_point.png.import b/assets/sprites/atlases/cursor/default_point.png.import new file mode 100644 index 0000000..bf8f04f --- /dev/null +++ b/assets/sprites/atlases/cursor/default_point.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cw0rqtl8ulndd" +path="res://.godot/imported/default_point.png-b784c50ce053ec62476f81e29e9cbbf8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/cursor/default_point.png" +dest_files=["res://.godot/imported/default_point.png-b784c50ce053ec62476f81e29e9cbbf8.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/assets/sprites/atlases/cursor/plant_arrow.png b/assets/sprites/atlases/cursor/plant_arrow.png new file mode 100644 index 0000000..d47dc41 Binary files /dev/null and b/assets/sprites/atlases/cursor/plant_arrow.png differ diff --git a/assets/sprites/atlases/cursor/plant_arrow.png.import b/assets/sprites/atlases/cursor/plant_arrow.png.import new file mode 100644 index 0000000..4924161 --- /dev/null +++ b/assets/sprites/atlases/cursor/plant_arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dx123mhv4oee" +path="res://.godot/imported/plant_arrow.png-3956c2fc071eacbb66c6ef38b1a85606.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/cursor/plant_arrow.png" +dest_files=["res://.godot/imported/plant_arrow.png-3956c2fc071eacbb66c6ef38b1a85606.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/assets/sprites/atlases/cursor/shovel_arrow.png b/assets/sprites/atlases/cursor/shovel_arrow.png new file mode 100644 index 0000000..ea9a0d1 Binary files /dev/null and b/assets/sprites/atlases/cursor/shovel_arrow.png differ diff --git a/assets/sprites/atlases/cursor/shovel_arrow.png.import b/assets/sprites/atlases/cursor/shovel_arrow.png.import new file mode 100644 index 0000000..0fc9161 --- /dev/null +++ b/assets/sprites/atlases/cursor/shovel_arrow.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dq375kjjo17g2" +path="res://.godot/imported/shovel_arrow.png-4920259538173907d058312f63ceacad.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/cursor/shovel_arrow.png" +dest_files=["res://.godot/imported/shovel_arrow.png-4920259538173907d058312f63ceacad.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/assets/sprites/atlases/cursors.ase b/assets/sprites/atlases/cursors.ase new file mode 100644 index 0000000..83c9e88 Binary files /dev/null and b/assets/sprites/atlases/cursors.ase differ diff --git a/assets/sprites/atlases/cursors.png b/assets/sprites/atlases/cursors.png new file mode 100644 index 0000000..196cef2 Binary files /dev/null and b/assets/sprites/atlases/cursors.png differ diff --git a/assets/sprites/atlases/cursors.png.import b/assets/sprites/atlases/cursors.png.import new file mode 100644 index 0000000..92b3f1c --- /dev/null +++ b/assets/sprites/atlases/cursors.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bavtfq6sx7og1" +path="res://.godot/imported/cursors.png-4bab4899b5bee9fb9f2191e6a4c15507.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/cursors.png" +dest_files=["res://.godot/imported/cursors.png-4bab4899b5bee9fb9f2191e6a4c15507.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/assets/sprites/atlases/plant_atlas.png b/assets/sprites/atlases/plant_atlas.png new file mode 100644 index 0000000..56d84c4 Binary files /dev/null and b/assets/sprites/atlases/plant_atlas.png differ diff --git a/assets/sprites/atlases/plant_atlas.png.import b/assets/sprites/atlases/plant_atlas.png.import new file mode 100644 index 0000000..c56596b --- /dev/null +++ b/assets/sprites/atlases/plant_atlas.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtd1id41sce3k" +path="res://.godot/imported/plant_atlas.png-7c803e7a32a2e016afd0df2b5656319e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plant_atlas.png" +dest_files=["res://.godot/imported/plant_atlas.png-7c803e7a32a2e016afd0df2b5656319e.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/assets/sprites/atlases/plants/aloe.png b/assets/sprites/atlases/plants/aloe.png new file mode 100644 index 0000000..e0ff477 Binary files /dev/null and b/assets/sprites/atlases/plants/aloe.png differ diff --git a/assets/sprites/atlases/plants/aloe.png.import b/assets/sprites/atlases/plants/aloe.png.import new file mode 100644 index 0000000..92e6b66 --- /dev/null +++ b/assets/sprites/atlases/plants/aloe.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b6tyoa5htapir" +path="res://.godot/imported/aloe.png-98cab871a2223a6762bf6c83bc166a4d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/aloe.png" +dest_files=["res://.godot/imported/aloe.png-98cab871a2223a6762bf6c83bc166a4d.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/assets/sprites/atlases/plants/garlic.png b/assets/sprites/atlases/plants/garlic.png new file mode 100644 index 0000000..66cd4cc Binary files /dev/null and b/assets/sprites/atlases/plants/garlic.png differ diff --git a/assets/sprites/atlases/plants/garlic.png.import b/assets/sprites/atlases/plants/garlic.png.import new file mode 100644 index 0000000..55c4776 --- /dev/null +++ b/assets/sprites/atlases/plants/garlic.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dff73m8ahamaa" +path="res://.godot/imported/garlic.png-e679c5b7eb4502e36fe465910bfa1756.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/garlic.png" +dest_files=["res://.godot/imported/garlic.png-e679c5b7eb4502e36fe465910bfa1756.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/assets/sprites/atlases/plants/peashooter.png b/assets/sprites/atlases/plants/peashooter.png new file mode 100644 index 0000000..a7ad42d Binary files /dev/null and b/assets/sprites/atlases/plants/peashooter.png differ diff --git a/assets/sprites/atlases/plants/peashooter.png.import b/assets/sprites/atlases/plants/peashooter.png.import new file mode 100644 index 0000000..286f625 --- /dev/null +++ b/assets/sprites/atlases/plants/peashooter.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cksryh4w5dbbx" +path="res://.godot/imported/peashooter.png-83b25b47dba7075c5ff9c13b11015aab.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/peashooter.png" +dest_files=["res://.godot/imported/peashooter.png-83b25b47dba7075c5ff9c13b11015aab.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/assets/sprites/atlases/plants/potato_mine.png b/assets/sprites/atlases/plants/potato_mine.png new file mode 100644 index 0000000..0c75e4e Binary files /dev/null and b/assets/sprites/atlases/plants/potato_mine.png differ diff --git a/assets/sprites/atlases/plants/potato_mine.png.import b/assets/sprites/atlases/plants/potato_mine.png.import new file mode 100644 index 0000000..6033dc2 --- /dev/null +++ b/assets/sprites/atlases/plants/potato_mine.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c77o6ba0mw7a3" +path="res://.godot/imported/potato_mine.png-522970a968710e713bbe9c4c1c14c6a3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/potato_mine.png" +dest_files=["res://.godot/imported/potato_mine.png-522970a968710e713bbe9c4c1c14c6a3.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/assets/sprites/atlases/plants/snow_pea.png b/assets/sprites/atlases/plants/snow_pea.png new file mode 100644 index 0000000..ff1f19b Binary files /dev/null and b/assets/sprites/atlases/plants/snow_pea.png differ diff --git a/assets/sprites/atlases/plants/snow_pea.png.import b/assets/sprites/atlases/plants/snow_pea.png.import new file mode 100644 index 0000000..fd568b2 --- /dev/null +++ b/assets/sprites/atlases/plants/snow_pea.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cu0651pvvkmvm" +path="res://.godot/imported/snow_pea.png-1955bdf47a5a3e1e8e04ad4787e98a49.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/snow_pea.png" +dest_files=["res://.godot/imported/snow_pea.png-1955bdf47a5a3e1e8e04ad4787e98a49.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/assets/sprites/atlases/plants/spikeweed.png b/assets/sprites/atlases/plants/spikeweed.png new file mode 100644 index 0000000..730f3be Binary files /dev/null and b/assets/sprites/atlases/plants/spikeweed.png differ diff --git a/assets/sprites/atlases/plants/spikeweed.png.import b/assets/sprites/atlases/plants/spikeweed.png.import new file mode 100644 index 0000000..d19cb35 --- /dev/null +++ b/assets/sprites/atlases/plants/spikeweed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://coafh3mjharxo" +path="res://.godot/imported/spikeweed.png-65536246af1ae74d9a917b7eb281a3de.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/spikeweed.png" +dest_files=["res://.godot/imported/spikeweed.png-65536246af1ae74d9a917b7eb281a3de.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/assets/sprites/atlases/plants/sunflower.png b/assets/sprites/atlases/plants/sunflower.png new file mode 100644 index 0000000..bf7bf3a Binary files /dev/null and b/assets/sprites/atlases/plants/sunflower.png differ diff --git a/assets/sprites/atlases/plants/sunflower.png.import b/assets/sprites/atlases/plants/sunflower.png.import new file mode 100644 index 0000000..a4ceebd --- /dev/null +++ b/assets/sprites/atlases/plants/sunflower.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b3tuidu8dag8u" +path="res://.godot/imported/sunflower.png-f1ec7688cdcdb0c6fd2aeee3e5aef48a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/sunflower.png" +dest_files=["res://.godot/imported/sunflower.png-f1ec7688cdcdb0c6fd2aeee3e5aef48a.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/assets/sprites/atlases/plants/wallnut.png b/assets/sprites/atlases/plants/wallnut.png new file mode 100644 index 0000000..b3a5e21 Binary files /dev/null and b/assets/sprites/atlases/plants/wallnut.png differ diff --git a/assets/sprites/atlases/plants/wallnut.png.import b/assets/sprites/atlases/plants/wallnut.png.import new file mode 100644 index 0000000..5e5ea0c --- /dev/null +++ b/assets/sprites/atlases/plants/wallnut.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dstqh1wc5dvmo" +path="res://.godot/imported/wallnut.png-7cb59ad96ebf875f629356b2b7d79add.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/wallnut.png" +dest_files=["res://.godot/imported/wallnut.png-7cb59ad96ebf875f629356b2b7d79add.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/assets/sprites/gui/FastForward1.tres b/assets/sprites/gui/FastForward1.tres new file mode 100644 index 0000000..31ca5a8 --- /dev/null +++ b/assets/sprites/gui/FastForward1.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bjsar1x67xk1t"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_r6k0p"] + +[resource] +atlas = ExtResource("1_r6k0p") +region = Rect2(36, 264, 36, 36) diff --git a/assets/sprites/gui/FastForward2.tres b/assets/sprites/gui/FastForward2.tres new file mode 100644 index 0000000..f290aac --- /dev/null +++ b/assets/sprites/gui/FastForward2.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dfr5ofieigu5j"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_cq0f1"] + +[resource] +atlas = ExtResource("1_cq0f1") +region = Rect2(36, 264, 36, 36) diff --git a/assets/sprites/gui/FastForward3.tres b/assets/sprites/gui/FastForward3.tres new file mode 100644 index 0000000..3e62d8f --- /dev/null +++ b/assets/sprites/gui/FastForward3.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://qgmsoocd4p1o"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_xsjda"] + +[resource] +atlas = ExtResource("1_xsjda") +region = Rect2(108, 264, 36, 36) diff --git a/assets/sprites/gui/Pause.tres b/assets/sprites/gui/Pause.tres new file mode 100644 index 0000000..261a76a --- /dev/null +++ b/assets/sprites/gui/Pause.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dm0hjd67a6mva"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_qlv5m"] + +[resource] +atlas = ExtResource("1_qlv5m") +region = Rect2(0, 264, 36, 36) diff --git a/assets/sprites/gui/PlantCard.tres b/assets/sprites/gui/PlantCard.tres new file mode 100644 index 0000000..74b046b --- /dev/null +++ b/assets/sprites/gui/PlantCard.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cmgaryx5wgu14"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_bxos1"] + +[resource] +atlas = ExtResource("1_bxos1") +region = Rect2(259, 172, 41, 56) diff --git a/assets/sprites/gui/Selection.tres b/assets/sprites/gui/Selection.tres new file mode 100644 index 0000000..aabf63f --- /dev/null +++ b/assets/sprites/gui/Selection.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cabpf23ndlvx0"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_safs8"] + +[resource] +atlas = ExtResource("1_safs8") +region = Rect2(300, 60, 41, 56) diff --git a/assets/sprites/gui/Shovel.tres b/assets/sprites/gui/Shovel.tres new file mode 100644 index 0000000..0b03406 --- /dev/null +++ b/assets/sprites/gui/Shovel.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cw73vihkrfenc"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_s2rs0"] + +[resource] +atlas = ExtResource("1_s2rs0") +region = Rect2(14, 145, 51, 47) diff --git a/assets/sprites/gui/suncounter.tres b/assets/sprites/gui/suncounter.tres new file mode 100644 index 0000000..cae461d --- /dev/null +++ b/assets/sprites/gui/suncounter.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bhp3vuvwf7lak"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_deojb"] + +[resource] +atlas = ExtResource("1_deojb") +region = Rect2(80, 120, 49, 27) diff --git a/assets/sprites/plants/pea.tres b/assets/sprites/plants/pea.tres new file mode 100644 index 0000000..685e585 --- /dev/null +++ b/assets/sprites/plants/pea.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dq0mul65hevtt"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_soyv1"] + +[resource] +atlas = ExtResource("1_soyv1") +region = Rect2(2, 130, 12, 12) diff --git a/assets/sprites/plants/peashooter.tres b/assets/sprites/plants/peashooter.tres new file mode 100644 index 0000000..f32f59d --- /dev/null +++ b/assets/sprites/plants/peashooter.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://ot1n4nval86w"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_vhxkc"] + +[resource] +atlas = ExtResource("1_vhxkc") +region = Rect2(1, 10, 42, 48) diff --git a/assets/sprites/summertime_saga.png b/assets/sprites/summertime_saga.png new file mode 100644 index 0000000..5464fa1 Binary files /dev/null and b/assets/sprites/summertime_saga.png differ diff --git a/assets/sprites/summertime_saga.png.import b/assets/sprites/summertime_saga.png.import new file mode 100644 index 0000000..612f026 --- /dev/null +++ b/assets/sprites/summertime_saga.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b0tb2hjum40aw" +path="res://.godot/imported/summertime_saga.png-a514e890c4a5a9aa20ec33143673fe69.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/summertime_saga.png" +dest_files=["res://.godot/imported/summertime_saga.png-a514e890c4a5a9aa20ec33143673fe69.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/assets/sprites/sun.tres b/assets/sprites/sun.tres new file mode 100644 index 0000000..4cc9c24 --- /dev/null +++ b/assets/sprites/sun.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://c47rflkf2wap0"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_wwp2c"] + +[resource] +atlas = ExtResource("1_wwp2c") +region = Rect2(84, 147, 45, 45) diff --git a/assets/sprites/zombie.tres b/assets/sprites/zombie.tres new file mode 100644 index 0000000..b1a93a6 --- /dev/null +++ b/assets/sprites/zombie.tres @@ -0,0 +1,7 @@ +[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bwwbkybryi6k0"] + +[ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_f3kba"] + +[resource] +atlas = ExtResource("1_f3kba") +region = Rect2(129, 104, 45, 88) diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..9d8b7fa --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..c838fd7 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://btvoh1lxk1tsn" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..17e8565 --- /dev/null +++ b/project.godot @@ -0,0 +1,50 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Liberation of the Neighbourville" +run/main_scene="res://scenes/debug_lvl.tscn" +config/features=PackedStringArray("4.3", "C#", "Forward Plus") +config/icon="res://icon.svg" + +[autoload] + +LevelController="*res://scripts/LevelController.cs" +Cursor="*res://scripts/Cursor.cs" + +[display] + +window/size/viewport_width=600 +window/size/viewport_height=400 +window/stretch/mode="canvas_items" + +[dotnet] + +project/assembly_name="NewLON" + +[input] + +cheat_add_sun={ +"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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) +] +} + +[layer_names] + +2d_physics/layer_1="Reserved" +2d_physics/layer_2="Plants" +2d_physics/layer_3="Zombies" + +[rendering] + +textures/canvas_textures/default_texture_filter=0 +2d/snap/snap_2d_transforms_to_pixel=true diff --git a/resources/animations/plants/peashooter.res b/resources/animations/plants/peashooter.res new file mode 100644 index 0000000..baca3ba Binary files /dev/null and b/resources/animations/plants/peashooter.res differ diff --git a/resources/plants/Peashooter.tres b/resources/plants/Peashooter.tres new file mode 100644 index 0000000..3a7559b --- /dev/null +++ b/resources/plants/Peashooter.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://c8rr1dc7mjr3d"] + +[ext_resource type="Script" path="res://scripts/resources/PlantResource.cs" id="1_amvh8"] +[ext_resource type="Texture2D" uid="uid://ot1n4nval86w" path="res://assets/sprites/plants/peashooter.tres" id="1_rnq6r"] +[ext_resource type="PackedScene" uid="uid://be1kgukmiu0hs" path="res://scenes/entities/plants/peashooter.tscn" id="1_rqf2x"] + +[resource] +script = ExtResource("1_amvh8") +Cost = 75 +Scene = ExtResource("1_rqf2x") +ReloadTime = 5.0 +StartReloadTime = 0.0 +Preview = ExtResource("1_rnq6r") diff --git a/scenes/debug_lvl.tscn b/scenes/debug_lvl.tscn new file mode 100644 index 0000000..89179a9 --- /dev/null +++ b/scenes/debug_lvl.tscn @@ -0,0 +1,51 @@ +[gd_scene load_steps=7 format=3 uid="uid://crxsvv7drckpw"] + +[ext_resource type="Script" path="res://scripts/components/level/RuntimeLevelData.cs" id="1_i3bf5"] +[ext_resource type="Texture2D" uid="uid://b0tb2hjum40aw" path="res://assets/sprites/summertime_saga.png" id="2_vmxhy"] +[ext_resource type="PackedScene" uid="uid://cg8713v6c5w15" path="res://scenes/pools.tscn" id="3_jv7x4"] +[ext_resource type="PackedScene" uid="uid://be1kgukmiu0hs" path="res://scenes/entities/plants/peashooter.tscn" id="4_esyy7"] +[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="5_5jekn"] +[ext_resource type="PackedScene" uid="uid://cfnmspei3k4p7" path="res://scenes/gui/runtime_gui.tscn" id="6_0baou"] + +[node name="debug_lvl" type="Node2D"] + +[node name="SummertimeSaga" type="Sprite2D" parent="."] +position = Vector2(500, 200) +texture = ExtResource("2_vmxhy") +metadata/_edit_lock_ = true + +[node name="Camera2D" type="Camera2D" parent="."] +position = Vector2(481, 200) +metadata/_edit_lock_ = true + +[node name="RuntimeLevelData" type="Node" parent="."] +script = ExtResource("1_i3bf5") + +[node name="Pools" parent="." instance=ExtResource("3_jv7x4")] + +[node name="Peashooter" parent="." instance=ExtResource("4_esyy7")] +position = Vector2(379, 105) +_line = 4 + +[node name="Peashooter2" parent="." instance=ExtResource("4_esyy7")] +position = Vector2(431, 162) +_line = 3 + +[node name="Peashooter3" parent="." instance=ExtResource("4_esyy7")] +position = Vector2(480, 224) +_line = 2 + +[node name="Peashooter4" parent="." instance=ExtResource("4_esyy7")] +position = Vector2(531, 283) +_line = 1 + +[node name="Peashooter5" parent="." instance=ExtResource("4_esyy7")] +position = Vector2(581, 345) + +[node name="Zombie" parent="." instance=ExtResource("5_5jekn")] +position = Vector2(686, 191) +_line = 3 + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="RuntimeGUI" parent="CanvasLayer" instance=ExtResource("6_0baou")] diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn new file mode 100644 index 0000000..99ea9e4 --- /dev/null +++ b/scenes/entities/Zombies/zombie.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=5 format=3 uid="uid://co11v3w8hbwgf"] + +[ext_resource type="Script" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"] +[ext_resource type="Texture2D" uid="uid://bwwbkybryi6k0" path="res://assets/sprites/zombie.tres" id="2_4pdxh"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"] +size = Vector2(24, 84) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r4ug6"] +size = Vector2(20, 48) + +[node name="Zombie" type="Node2D"] +script = ExtResource("1_qq3f1") +_maxHP = 100 + +[node name="Sprite" type="Sprite2D" parent="."] +position = Vector2(0, -44) +texture = ExtResource("2_4pdxh") + +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 4 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +position = Vector2(2, -42) +shape = SubResource("RectangleShape2D_hxyad") + +[node name="Eatbox" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eatbox"] +position = Vector2(-10, -24) +shape = SubResource("RectangleShape2D_r4ug6") diff --git a/scenes/entities/plants/pea.tscn b/scenes/entities/plants/pea.tscn new file mode 100644 index 0000000..ad8fbb4 --- /dev/null +++ b/scenes/entities/plants/pea.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=4 format=3 uid="uid://b2hrv0aqbui7u"] + +[ext_resource type="Script" path="res://scripts/LinearProjectile.cs" id="1_3kc4s"] +[ext_resource type="Texture2D" uid="uid://dq0mul65hevtt" path="res://assets/sprites/plants/pea.tres" id="2_26q5x"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_ix1sk"] +radius = 6.0 + +[node name="Pea" type="Area2D"] +collision_layer = 2 +collision_mask = 4 +script = ExtResource("1_3kc4s") +_speed = 3.0 + +[node name="Sprite" type="Sprite2D" parent="."] +texture = ExtResource("2_26q5x") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_ix1sk") + +[node name="Timer" type="Timer" parent="."] +wait_time = 15.0 +one_shot = true +autostart = true + +[connection signal="area_entered" from="." to="." method="OnAreaEntered"] +[connection signal="timeout" from="Timer" to="." method="queue_free"] diff --git a/scenes/entities/plants/peashooter.tscn b/scenes/entities/plants/peashooter.tscn new file mode 100644 index 0000000..1eddc8d --- /dev/null +++ b/scenes/entities/plants/peashooter.tscn @@ -0,0 +1,117 @@ +[gd_scene load_steps=19 format=3 uid="uid://be1kgukmiu0hs"] + +[ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="1_cmjrw"] +[ext_resource type="Script" path="res://scripts/components/plants/RuntimePlantData.cs" id="1_f4h5i"] +[ext_resource type="AnimationLibrary" uid="uid://bv1dl1g4dmbho" path="res://resources/animations/plants/peashooter.res" id="2_vs0tj"] +[ext_resource type="Script" path="res://scripts/components/plants/Shooter.cs" id="4_sbggp"] +[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/entities/plants/pea.tscn" id="5_66an8"] +[ext_resource type="Script" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="6_0812i"] +[ext_resource type="Script" path="res://scripts/components/plants/behaviours/PeashooterBehaviour.cs" id="6_tdkoh"] +[ext_resource type="Script" path="res://scripts/components/plants/Eyesight.cs" id="7_fdkt2"] + +[sub_resource type="Animation" id="Animation_pephc"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_djmlc"] +_data = { +"RESET": SubResource("Animation_pephc") +} + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_w1am6"] +animation = &"peashooter/idle" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_irqfm"] +animation = &"peashooter/shoot" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4oxpj"] +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_bjldt"] +advance_mode = 2 +advance_condition = &"ready" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_srdpm"] +switch_mode = 2 +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_8qsie"] +states/Start/position = Vector2(192, 100) +states/peashooter_idle/node = SubResource("AnimationNodeAnimation_w1am6") +states/peashooter_idle/position = Vector2(457, 91) +states/peashooter_shoot/node = SubResource("AnimationNodeAnimation_irqfm") +states/peashooter_shoot/position = Vector2(660, 91) +transitions = ["Start", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_4oxpj"), "peashooter_idle", "peashooter_shoot", SubResource("AnimationNodeStateMachineTransition_bjldt"), "peashooter_shoot", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_srdpm")] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_4stx8"] +size = Vector2(26, 48) + +[sub_resource type="SegmentShape2D" id="SegmentShape2D_v570y"] +resource_local_to_scene = true +b = Vector2(5.865, 0) + +[node name="Peashooter" type="Node2D"] +script = ExtResource("1_f4h5i") + +[node name="Sprite" type="Sprite2D" parent="."] +texture = ExtResource("1_cmjrw") +hframes = 2 +vframes = 10 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_djmlc"), +"peashooter": ExtResource("2_vs0tj") +} + +[node name="AnimationTree" type="AnimationTree" parent="."] +tree_root = SubResource("AnimationNodeStateMachine_8qsie") +anim_player = NodePath("../AnimationPlayer") +parameters/conditions/ready = false + +[node name="Hitbox" type="Area2D" parent="."] +collision_layer = 2 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +position = Vector2(0, 4) +shape = SubResource("RectangleShape2D_4stx8") + +[node name="Shooter" type="Node2D" parent="." node_paths=PackedStringArray("_timer")] +position = Vector2(17, -4) +script = ExtResource("4_sbggp") +_projectile = ExtResource("5_66an8") +_timer = NodePath("Timer") + +[node name="Timer" type="Timer" parent="Shooter"] +wait_time = 1.5 +one_shot = true + +[node name="Behaviour" type="Node" parent="." node_paths=PackedStringArray("_animationTree", "_shootTimer", "_sight")] +script = ExtResource("6_tdkoh") +_animationTree = NodePath("../AnimationTree") +_shootTimer = NodePath("../Shooter/Timer") +_sight = NodePath("../Eyesight") + +[node name="Eyesight" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 4 +script = ExtResource("7_fdkt2") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eyesight"] +shape = SubResource("SegmentShape2D_v570y") +script = ExtResource("6_0812i") + +[connection signal="area_entered" from="Eyesight" to="Eyesight" method="OnAreaEntered"] +[connection signal="area_exited" from="Eyesight" to="Eyesight" method="OnAreaExited"] diff --git a/scenes/gui/fast_forward_button.tscn b/scenes/gui/fast_forward_button.tscn new file mode 100644 index 0000000..1894c21 --- /dev/null +++ b/scenes/gui/fast_forward_button.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=2 format=3 uid="uid://cgm7td1hgs0rr"] + +[ext_resource type="Texture2D" uid="uid://bjsar1x67xk1t" path="res://assets/sprites/gui/FastForward1.tres" id="1_ta3h7"] + +[node name="FastForwardButton" type="TextureButton"] +anchors_preset = -1 +anchor_right = 0.06 +anchor_bottom = 0.09 +size_flags_vertical = 4 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("1_ta3h7") +stretch_mode = 0 diff --git a/scenes/gui/pause_button.tscn b/scenes/gui/pause_button.tscn new file mode 100644 index 0000000..2d92202 --- /dev/null +++ b/scenes/gui/pause_button.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=2 format=3 uid="uid://u5l3jd00s8vd"] + +[ext_resource type="Texture2D" uid="uid://dm0hjd67a6mva" path="res://assets/sprites/gui/Pause.tres" id="1_7k3tg"] + +[node name="PauseButton" type="TextureButton"] +anchors_preset = -1 +anchor_right = 0.067 +anchor_bottom = 0.1 +offset_right = -0.200001 +size_flags_vertical = 4 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("1_7k3tg") +stretch_mode = 0 diff --git a/scenes/gui/plant_card.tscn b/scenes/gui/plant_card.tscn new file mode 100644 index 0000000..814fa77 --- /dev/null +++ b/scenes/gui/plant_card.tscn @@ -0,0 +1,38 @@ +[gd_scene load_steps=4 format=3 uid="uid://c8qru1yhnbbkl"] + +[ext_resource type="Texture2D" uid="uid://cmgaryx5wgu14" path="res://assets/sprites/gui/PlantCard.tres" id="1_fugf5"] +[ext_resource type="Texture2D" uid="uid://cabpf23ndlvx0" path="res://assets/sprites/gui/Selection.tres" id="2_5mpv8"] + +[sub_resource type="LabelSettings" id="LabelSettings_js4li"] +font_size = 13 +font_color = Color(0, 0, 0, 1) + +[node name="PlantCard" type="TextureButton"] +anchors_preset = -1 +anchor_right = 0.137 +anchor_bottom = 0.28 +offset_right = -0.200005 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("1_fugf5") +texture_pressed = ExtResource("2_5mpv8") +texture_focused = ExtResource("2_5mpv8") +stretch_mode = 0 +metadata/_edit_use_anchors_ = true + +[node name="Label" type="Label" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.146 +anchor_top = 0.732 +anchor_right = 0.854 +anchor_bottom = 0.893 +offset_left = 0.0279989 +offset_top = 0.0159912 +offset_right = -0.0279999 +offset_bottom = -0.0160065 +grow_horizontal = 2 +grow_vertical = 2 +label_settings = SubResource("LabelSettings_js4li") +horizontal_alignment = 1 +vertical_alignment = 1 +text_overrun_behavior = 3 diff --git a/scenes/gui/runtime_gui.tscn b/scenes/gui/runtime_gui.tscn new file mode 100644 index 0000000..597de7b --- /dev/null +++ b/scenes/gui/runtime_gui.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=6 format=3 uid="uid://cfnmspei3k4p7"] + +[ext_resource type="PackedScene" uid="uid://ky35veswaytr" path="res://scenes/gui/sun_counter.tscn" id="1_le3od"] +[ext_resource type="PackedScene" uid="uid://c8qru1yhnbbkl" path="res://scenes/gui/plant_card.tscn" id="2_cjtsw"] +[ext_resource type="PackedScene" uid="uid://t0vpmycj6c8j" path="res://scenes/gui/shovel_button.tscn" id="3_bheea"] +[ext_resource type="PackedScene" uid="uid://cgm7td1hgs0rr" path="res://scenes/gui/fast_forward_button.tscn" id="4_66uy4"] +[ext_resource type="PackedScene" uid="uid://u5l3jd00s8vd" path="res://scenes/gui/pause_button.tscn" id="5_jyq78"] + +[node name="RuntimeGUI" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Hotbar" type="HBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 1.0 +anchor_bottom = 0.14 +offset_bottom = -29.0 +grow_horizontal = 2 +metadata/_edit_use_anchors_ = true + +[node name="SunCounter" parent="Hotbar" instance=ExtResource("1_le3od")] +layout_mode = 2 + +[node name="Seedpackets" type="HBoxContainer" parent="Hotbar"] +layout_mode = 2 +theme_override_constants/separation = 0 + +[node name="PlantCard" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="PlantCard2" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="PlantCard3" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="PlantCard4" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="PlantCard5" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="PlantCard6" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="PlantCard7" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="PlantCard8" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="PlantCard9" parent="Hotbar/Seedpackets" instance=ExtResource("2_cjtsw")] +layout_mode = 2 + +[node name="ShovelButton" parent="Hotbar" instance=ExtResource("3_bheea")] +layout_mode = 2 + +[node name="FastForwardButton" parent="Hotbar" instance=ExtResource("4_66uy4")] +layout_mode = 2 + +[node name="PauseButton" parent="Hotbar" instance=ExtResource("5_jyq78")] +layout_mode = 2 diff --git a/scenes/gui/shovel_button.tscn b/scenes/gui/shovel_button.tscn new file mode 100644 index 0000000..b147ab6 --- /dev/null +++ b/scenes/gui/shovel_button.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=2 format=3 uid="uid://t0vpmycj6c8j"] + +[ext_resource type="Texture2D" uid="uid://cw73vihkrfenc" path="res://assets/sprites/gui/Shovel.tres" id="1_46afk"] + +[node name="ShovelButton" type="TextureButton"] +anchors_preset = -1 +anchor_right = 0.085 +anchor_bottom = 0.117 +offset_right = -11.0 +offset_bottom = -6.8 +size_flags_horizontal = 4 +size_flags_vertical = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("1_46afk") +stretch_mode = 0 diff --git a/scenes/gui/sun_counter.tscn b/scenes/gui/sun_counter.tscn new file mode 100644 index 0000000..b16ee0f --- /dev/null +++ b/scenes/gui/sun_counter.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=5 format=3 uid="uid://ky35veswaytr"] + +[ext_resource type="Texture2D" uid="uid://bhp3vuvwf7lak" path="res://assets/sprites/gui/suncounter.tres" id="1_e5x4k"] +[ext_resource type="Texture2D" uid="uid://c47rflkf2wap0" path="res://assets/sprites/sun.tres" id="2_gugre"] +[ext_resource type="Script" path="res://scripts/components/gui/SunCounter.cs" id="3_qhmb8"] + +[sub_resource type="LabelSettings" id="LabelSettings_lxkq5"] +font_size = 10 +font_color = Color(0, 0, 0, 1) + +[node name="SunCounter" type="TextureRect"] +anchors_preset = -1 +anchor_right = 0.082 +anchor_bottom = 0.067 +offset_right = -0.200001 +offset_bottom = 0.199999 +size_flags_vertical = 0 +texture = ExtResource("1_e5x4k") + +[node name="Sun" type="TextureRect" parent="."] +show_behind_parent = true +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.5 +anchor_top = 1.019 +anchor_right = 0.5 +anchor_bottom = 1.019 +offset_left = -22.5 +offset_top = -22.513 +offset_right = 22.5 +offset_bottom = 22.487 +texture = ExtResource("2_gugre") + +[node name="Label" type="Label" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.122 +anchor_top = 0.222 +anchor_right = 0.878 +anchor_bottom = 0.778 +offset_left = 0.0219994 +offset_top = 0.00599957 +offset_right = -0.0219994 +offset_bottom = -0.00600243 +label_settings = SubResource("LabelSettings_lxkq5") +horizontal_alignment = 1 +vertical_alignment = 1 +text_overrun_behavior = 3 +script = ExtResource("3_qhmb8") diff --git a/scenes/level_template.tscn b/scenes/level_template.tscn new file mode 100644 index 0000000..ab15fdf --- /dev/null +++ b/scenes/level_template.tscn @@ -0,0 +1,3 @@ +[gd_scene format=3 uid="uid://dd3yegl1xo44m"] + +[node name="level_template" type="Node2D"] diff --git a/scenes/pools.tscn b/scenes/pools.tscn new file mode 100644 index 0000000..b483df0 --- /dev/null +++ b/scenes/pools.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=2 format=3 uid="uid://cg8713v6c5w15"] + +[ext_resource type="Script" path="res://scripts/components/level/PoolContainer.cs" id="1_31ggc"] + +[node name="Pools" type="Node" node_paths=PackedStringArray("Zombies", "Plants", "Projectiles", "Structures")] +script = ExtResource("1_31ggc") +Zombies = NodePath("Zombies") +Plants = NodePath("Plants") +Projectiles = NodePath("Projectiles") +Structures = NodePath("Structures") + +[node name="Zombies" type="Node" parent="."] + +[node name="Plants" type="Node" parent="."] + +[node name="Projectiles" type="Node" parent="."] + +[node name="Structures" type="Node" parent="."] diff --git a/scripts/Cursor.cs b/scripts/Cursor.cs new file mode 100644 index 0000000..9856beb --- /dev/null +++ b/scripts/Cursor.cs @@ -0,0 +1,18 @@ +using Godot; +using System; + +public partial class Cursor : Node +{ + public static Cursor Instance { get; private set; } + public override void _Ready() + { + Instance = this; + SetDefaultCursorSet(); + } + + public void SetDefaultCursorSet() + { + Input.SetCustomMouseCursor(ResourceLoader.Load("res://assets/sprites/atlases/cursor/default_arrow.png")); + Input.SetCustomMouseCursor(ResourceLoader.Load("res://assets/sprites/atlases/cursor/default_point.png"),shape:Input.CursorShape.PointingHand); + } +} diff --git a/scripts/LevelButton.cs b/scripts/LevelButton.cs new file mode 100644 index 0000000..96637a1 --- /dev/null +++ b/scripts/LevelButton.cs @@ -0,0 +1,12 @@ +using Godot; +using System; + +// +// Button that contains level to load +// + +public partial class LevelButton : Node +{ + [Export] private Script _levelScript; + [Export] private PackedScene _levelTileset; +} diff --git a/scripts/LevelController.cs b/scripts/LevelController.cs new file mode 100644 index 0000000..05216d9 --- /dev/null +++ b/scripts/LevelController.cs @@ -0,0 +1,50 @@ +using Godot; +using System; + +// +// Class that gives access to level data, pools and etc. +// + +public partial class LevelController : Node +{ + public static LevelController Instance { get; private set; } + + private bool _isLevelRunning = false; + + public RuntimeLevelData LevelData { get; set; } + public PoolContainer Pools { get; set; } + + public override void _EnterTree() + { + Instance = this; + } + + public override void _ExitTree() + { + Instance = null; + } + + public void StartLevel(PackedScene levelTileset, Script levelScript = null) + { + if (_isLevelRunning) + return; + + GetTree().ChangeSceneToPacked(levelTileset); + + if (levelScript != null) + GetTree().CurrentScene.SetScript(levelScript); + + _isLevelRunning = true; + } + + public void EndLevel() + { + if (_isLevelRunning == false) + return; + + LevelData = null; + Pools = null; + + _isLevelRunning = false; + } +} diff --git a/scripts/LinearProjectile.cs b/scripts/LinearProjectile.cs new file mode 100644 index 0000000..dc9a29d --- /dev/null +++ b/scripts/LinearProjectile.cs @@ -0,0 +1,31 @@ +using Godot; +using System; + +// +// Projectile that travels from left to right +// + +public partial class LinearProjectile : Area2D, IProjectile +{ + [Export(hintString: "suffix:tile/sec")] + private float _speed; + [Export] + private int _damage; + private int _line; + public int Line { get => _line; set { _line = value; } } + + public override void _PhysicsProcess(double delta) + { + Translate(Vector2.Right * _speed * (float)delta * Utility.TileWidth); + } + + public void OnAreaEntered(Area2D area) + { + var entity = area.GetParent(); + if (entity != null && entity.Line == _line) + { + entity.TakeDamage(_damage); + QueueFree(); + } + } +} diff --git a/scripts/Utility.cs b/scripts/Utility.cs new file mode 100644 index 0000000..7b5d9b0 --- /dev/null +++ b/scripts/Utility.cs @@ -0,0 +1,14 @@ +using Godot; +using System; + +// +// Class for general-used constants and utility tools +// + +public partial class Utility +{ + public const int TileWidth = 50; + public const int TileHeight = 60; + public static readonly Vector2I LeftFieldBoundary = new Vector2I(305,76); + public static readonly Vector2I RightFieldBoundary = new Vector2I(755,376); +} diff --git a/scripts/components/IEntity.cs b/scripts/components/IEntity.cs new file mode 100644 index 0000000..fb481a8 --- /dev/null +++ b/scripts/components/IEntity.cs @@ -0,0 +1,11 @@ +// +// Base interface for entities +// +public interface IEntity +{ + public int Hp { get; } + public int MaxHp { get; } + public int Line { get; } + public void TakeDamage(int amount); + public void Heal(int amount); +} diff --git a/scripts/components/IProjectile.cs b/scripts/components/IProjectile.cs new file mode 100644 index 0000000..a7ca6bb --- /dev/null +++ b/scripts/components/IProjectile.cs @@ -0,0 +1,7 @@ +// +// Base interface for entities +// +public interface IProjectile +{ + public int Line { get; set; } +} diff --git a/scripts/components/gui/SunCounter.cs b/scripts/components/gui/SunCounter.cs new file mode 100644 index 0000000..b2556da --- /dev/null +++ b/scripts/components/gui/SunCounter.cs @@ -0,0 +1,10 @@ +using Godot; +using System; + +public partial class SunCounter : Label +{ + public override void _Process(double delta) + { + Text = LevelController.Instance.LevelData.SunCount.ToString(); + } +} diff --git a/scripts/components/level/PoolContainer.cs b/scripts/components/level/PoolContainer.cs new file mode 100644 index 0000000..a77a3cb --- /dev/null +++ b/scripts/components/level/PoolContainer.cs @@ -0,0 +1,24 @@ +using Godot; +using System; + +// +// PoolContainer contains nodes that contain different elemnts that generate during runtime +// Is not pool in traditional sense, but named like that to prevent repetition +// + +public partial class PoolContainer : Node +{ + [Export] + public Node Zombies { get; private set; } + [Export] + public Node Plants { get; private set; } + [Export] + public Node Projectiles { get; private set; } + [Export] + public Node Structures { get; private set; } + + public override void _Ready() + { + LevelController.Instance.Pools = this; + } +} diff --git a/scripts/components/level/RuntimeLevelData.cs b/scripts/components/level/RuntimeLevelData.cs new file mode 100644 index 0000000..acb5f6f --- /dev/null +++ b/scripts/components/level/RuntimeLevelData.cs @@ -0,0 +1,33 @@ +using Godot; +//using Godot.Collections; +using System; + +public partial class RuntimeLevelData : Node +{ + public int SunCount { get; private set; } = 0; + + public override void _Ready() + { + LevelController.Instance.LevelData = this; + } + + public void AddSun(int amount) + { + SunCount += amount; + } + + public bool TrySpendSun(int amount) + { + if (SunCount - amount < 0) return false; + + SunCount -= amount; + + return true; + } + + //private Array _selectedPlants; + //private bool _selected; + //public Array GetSelectedPlants(); + //public bool TrySelectPlants(Array); + //public void ResetSelection(); +} diff --git a/scripts/components/plants/Eyesight.cs b/scripts/components/plants/Eyesight.cs new file mode 100644 index 0000000..22fb179 --- /dev/null +++ b/scripts/components/plants/Eyesight.cs @@ -0,0 +1,43 @@ +using Godot; +using System.Collections.Generic; + +public partial class Eyesight : Area2D +{ + private bool _enemyDetected; + public bool EnemyDetected => _enemyDetected; + private List _detectedEntities = new List(); + private RuntimePlantData _plantData; + + public override void _Ready() + { + _plantData = GetParent(); + } + + public void OnAreaEntered(Area2D area) + { + var entity = area.GetParent(); + if (entity != null) + { + if (_plantData.Line == entity.Line) + { + _detectedEntities.Add(entity); + } + } + + _enemyDetected = _detectedEntities.Count > 0; + } + + public void OnAreaExited(Area2D area) + { + var entity = area.GetParent(); + if (entity != null) + { + if (_detectedEntities.Contains(entity)) + { + _detectedEntities.Remove(entity); + } + } + + _enemyDetected = _detectedEntities.Count > 0; + } +} diff --git a/scripts/components/plants/PlantEyesightLimiter.cs b/scripts/components/plants/PlantEyesightLimiter.cs new file mode 100644 index 0000000..8e546cd --- /dev/null +++ b/scripts/components/plants/PlantEyesightLimiter.cs @@ -0,0 +1,13 @@ +using Godot; +using System; + +public partial class PlantEyesightLimiter : CollisionShape2D +{ + public override void _Ready() + { + if (Shape is SegmentShape2D segment) + { + segment.B = new Vector2(Utility.RightFieldBoundary.X-GlobalPosition.X, 0); + } + } +} \ No newline at end of file diff --git a/scripts/components/plants/RuntimePlantData.cs b/scripts/components/plants/RuntimePlantData.cs new file mode 100644 index 0000000..d0827ea --- /dev/null +++ b/scripts/components/plants/RuntimePlantData.cs @@ -0,0 +1,43 @@ +using Godot; +using System; + +// +// Data that plant stores during runtime +// + +public partial class RuntimePlantData : Node2D, IEntity +{ + [Export] + private int _maxHP; + private int _hp; + [Export] + private int _line; + public int Hp => _hp; + public int MaxHp => _maxHP; + public int Line => _line; + + public override void _Ready() + { + _hp = _maxHP; + } + + public void Heal(int amount) + { + _hp += amount; + + if (MaxHp > 0) + { + _hp = MaxHp; + } + } + + public void TakeDamage(int amount) + { + _hp -= amount; + + if (_hp <= 0) + { + QueueFree(); + } + } +} diff --git a/scripts/components/plants/Shooter.cs b/scripts/components/plants/Shooter.cs new file mode 100644 index 0000000..9629a2e --- /dev/null +++ b/scripts/components/plants/Shooter.cs @@ -0,0 +1,31 @@ +using Godot; + +// Shoot component of some plants +public partial class Shooter : Node2D +{ + [Export] private PackedScene _projectile; + [Export] private Timer _timer; + + private RuntimePlantData _plantData; + + public override void _Ready() + { + _plantData = GetParent(); + } + + + public void Shoot() + { + if (_timer.TimeLeft > 0) return; + + _timer.Start(); + var instance = _projectile.Instantiate(); + LevelController.Instance.Pools.Projectiles.AddChild(instance); + instance.GlobalTransform = GlobalTransform; + + if (instance is IProjectile projectile) + { + projectile.Line = _plantData.Line; + } + } +} diff --git a/scripts/components/plants/behaviours/PeashooterBehaviour.cs b/scripts/components/plants/behaviours/PeashooterBehaviour.cs new file mode 100644 index 0000000..5f6edf3 --- /dev/null +++ b/scripts/components/plants/behaviours/PeashooterBehaviour.cs @@ -0,0 +1,16 @@ +using Godot; +using System; + +public partial class PeashooterBehaviour : Node +{ + [Export] private AnimationTree _animationTree; + [Export] private Timer _shootTimer; + [Export] private Eyesight _sight; + + public override void _Process(double delta) + { + bool readyToShoot = _sight.EnemyDetected && _shootTimer.TimeLeft <= 0; + + _animationTree.Set("parameters/conditions/ready", readyToShoot); + } +} diff --git a/scripts/components/zombies/RuntimeZombieData.cs b/scripts/components/zombies/RuntimeZombieData.cs new file mode 100644 index 0000000..b95c235 --- /dev/null +++ b/scripts/components/zombies/RuntimeZombieData.cs @@ -0,0 +1,41 @@ +using Godot; +using System; + +public partial class RuntimeZombieData : Node2D, IEntity +{ + private int _hp; + [Export] + private int _maxHP; + [Export] + private int _line; + public int Hp => _hp; + + public int MaxHp => _maxHP; + + public int Line => _line; + + public override void _Ready() + { + _hp = _maxHP; + } + + public void Heal(int amount) + { + _hp += amount; + + if (MaxHp > 0) + { + _hp = MaxHp; + } + } + + public void TakeDamage(int amount) + { + _hp -= amount; + + if (_hp <= 0) + { + QueueFree(); + } + } +} diff --git a/scripts/debug/Cheats.cs b/scripts/debug/Cheats.cs new file mode 100644 index 0000000..963fe9f --- /dev/null +++ b/scripts/debug/Cheats.cs @@ -0,0 +1,13 @@ +using Godot; +using System; + +public partial class Cheats : Node +{ + public override void _Input(InputEvent @event) + { + if (@event.IsActionPressed("cheat_add_sun")) + { + LevelController.Instance.LevelData.AddSun(50); + } + } +} diff --git a/scripts/debug/Clock.cs b/scripts/debug/Clock.cs new file mode 100644 index 0000000..7d97deb --- /dev/null +++ b/scripts/debug/Clock.cs @@ -0,0 +1,18 @@ +using Godot; +using System; + +// +// Debug tool to check time since clock loaded +// + +public partial class Clock : Label +{ + private ulong _time = 0; + public override void _Process(double delta) + { + _time += (ulong)(delta*1000); + ulong seconds = _time / 1000 % 60; + ulong minutes = seconds / 60 % 60; + Text = minutes.ToString()+":"+seconds.ToString(); + } +} diff --git a/scripts/resources/PlantResource.cs b/scripts/resources/PlantResource.cs new file mode 100644 index 0000000..5aac6ad --- /dev/null +++ b/scripts/resources/PlantResource.cs @@ -0,0 +1,17 @@ +using Godot; +using System; + +[GlobalClass] +public partial class PlantResource : Resource +{ + [Export] + public int Cost; + [Export] + public PackedScene Scene; + [Export] + public float ReloadTime; + [Export] + public float StartReloadTime; + [Export] + public Texture Preview; +}