diff --git a/.idea/.idea.Babushka/.idea/inspectionProfiles/Project_Default.xml b/.idea/.idea.Babushka/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..88bef76 --- /dev/null +++ b/.idea/.idea.Babushka/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.Babushka/.idea/libraries/GdSdk_Master.xml b/.idea/.idea.Babushka/.idea/libraries/GdSdk_Master.xml deleted file mode 100644 index 7a80e64..0000000 --- a/.idea/.idea.Babushka/.idea/libraries/GdSdk_Master.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/art/farm/farming/farmobjekte/broken tools atlas.png.import b/art/farm/farming/farmobjekte/broken tools atlas.png.import index 7e10768..6752385 100644 --- a/art/farm/farming/farmobjekte/broken tools atlas.png.import +++ b/art/farm/farming/farmobjekte/broken tools atlas.png.import @@ -3,25 +3,26 @@ importer="texture" type="CompressedTexture2D" uid="uid://bylgmr0skwtrs" -path="res://.godot/imported/broken tools atlas.png-ac2818c7b186429092a60cc6ac3b6431.ctex" +path.s3tc="res://.godot/imported/broken tools atlas.png-ac2818c7b186429092a60cc6ac3b6431.s3tc.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc"], +"vram_texture": true } [deps] source_file="res://art/farm/farming/farmobjekte/broken tools atlas.png" -dest_files=["res://.godot/imported/broken tools atlas.png-ac2818c7b186429092a60cc6ac3b6431.ctex"] +dest_files=["res://.godot/imported/broken tools atlas.png-ac2818c7b186429092a60cc6ac3b6431.s3tc.ctex"] [params] -compress/mode=0 +compress/mode=2 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/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +32,4 @@ 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 +detect_3d/compress_to=0 diff --git a/art/farm/farming/farmobjekte/harke.png b/art/farm/farming/farmobjekte/harke.png new file mode 100644 index 0000000..1b501b5 Binary files /dev/null and b/art/farm/farming/farmobjekte/harke.png differ diff --git a/art/farm/farming/farmobjekte/harke.png.import b/art/farm/farming/farmobjekte/harke.png.import new file mode 100644 index 0000000..f5d6fb2 --- /dev/null +++ b/art/farm/farming/farmobjekte/harke.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c4ggew55w0icj" +path.s3tc="res://.godot/imported/harke.png-ae5b280d25e62308e3ea6db5803e7742.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/farm/farming/farmobjekte/harke.png" +dest_files=["res://.godot/imported/harke.png-ae5b280d25e62308e3ea6db5803e7742.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +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=0 diff --git a/art/farm/farming/farmobjekte/tools atlas.png b/art/farm/farming/farmobjekte/tools atlas.png new file mode 100644 index 0000000..82ee5ac Binary files /dev/null and b/art/farm/farming/farmobjekte/tools atlas.png differ diff --git a/art/farm/farming/farmobjekte/tools atlas.png.import b/art/farm/farming/farmobjekte/tools atlas.png.import new file mode 100644 index 0000000..1f7b9c9 --- /dev/null +++ b/art/farm/farming/farmobjekte/tools atlas.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://x8hr8287ff2n" +path.s3tc="res://.godot/imported/tools atlas.png-6bb854eba7b52fe0263410000fb8738e.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://art/farm/farming/farmobjekte/tools atlas.png" +dest_files=["res://.godot/imported/tools atlas.png-6bb854eba7b52fe0263410000fb8738e.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +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=0 diff --git a/art/farm/tilable grounds/böden/nasse farming erde.png.import b/art/farm/tilable grounds/böden/nasse farming erde.png.import index 776f0fe..dd460e6 100644 --- a/art/farm/tilable grounds/böden/nasse farming erde.png.import +++ b/art/farm/tilable grounds/böden/nasse farming erde.png.import @@ -3,25 +3,26 @@ importer="texture" type="CompressedTexture2D" uid="uid://ctvdxwgmfaj5c" -path="res://.godot/imported/nasse farming erde.png-b0f4616f6a155f8e5d49e54e16723440.ctex" +path.s3tc="res://.godot/imported/nasse farming erde.png-b0f4616f6a155f8e5d49e54e16723440.s3tc.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc"], +"vram_texture": true } [deps] source_file="res://art/farm/tilable grounds/böden/nasse farming erde.png" -dest_files=["res://.godot/imported/nasse farming erde.png-b0f4616f6a155f8e5d49e54e16723440.ctex"] +dest_files=["res://.godot/imported/nasse farming erde.png-b0f4616f6a155f8e5d49e54e16723440.s3tc.ctex"] [params] -compress/mode=0 +compress/mode=2 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/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +32,4 @@ 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 +detect_3d/compress_to=0 diff --git a/prefabs/Player3D.tscn b/prefabs/Player3D.tscn index bd9777b..2b206c2 100644 --- a/prefabs/Player3D.tscn +++ b/prefabs/Player3D.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=5 format=3 uid="uid://dbd1niu3tp8y5"] -[ext_resource type="Script" uid="uid://cp4snd0amnhfu" path="res://scripts/CSharp/Common/Player3D.cs" id="1_3trg2"] +[ext_resource type="Script" uid="uid://b4ugrget2x6lb" path="res://scripts/CSharp/Common/CharacterControls/Player3D.cs" id="1_3trg2"] [ext_resource type="Texture2D" uid="uid://duaideiajsu8r" path="res://art/Characters/Vesna/babushka concept art vesna.png" id="2_3trg2"] -[ext_resource type="Script" uid="uid://c81bn1w8o0n2n" path="res://scripts/CSharp/Common/CameraPivot.cs" id="3_3trg2"] +[ext_resource type="Script" uid="uid://r5tahuqvbucy" path="res://scripts/CSharp/Common/Camera/CameraPivot.cs" id="3_3trg2"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1vdrh"] radius = 0.0478421 @@ -11,10 +11,11 @@ height = 0.234557 [node name="Player3d" type="Node3D"] [node name="CharacterBody3D" type="CharacterBody3D" parent="." node_paths=PackedStringArray("_camera", "_frontSprite", "_sideSprite")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0) collision_layer = 16 collision_mask = 17 script = ExtResource("1_3trg2") -_speed = 10.0 +_speed = 400.0 _camera = NodePath("CameraPivot2/SubPivot/Camera3D") _frontSprite = NodePath("FrontSprite") _sideSprite = NodePath("SideSprite") @@ -52,3 +53,5 @@ _subPivot = NodePath("SubPivot") [node name="Camera3D" type="Camera3D" parent="CharacterBody3D/CameraPivot2/SubPivot"] transform = Transform3D(1, 0, 0, 0, 0.933581, 0.358368, 0, -0.358368, 0.933581, 0, 0.638658, 1.73382) fov = 24.0844 + +[node name="FarmingMechanic" type="Node3D" parent="CharacterBody3D"] diff --git a/prefabs/farming/base_field.tscn b/prefabs/farming/base_field.tscn index c5a3492..0e74e99 100644 --- a/prefabs/farming/base_field.tscn +++ b/prefabs/farming/base_field.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://biwd3jj65qrlh"] [ext_resource type="Texture2D" uid="uid://c2pirgay3jfnn" path="res://art/farm/tilable grounds/böden/trockene farming erde.png" id="1_2cisk"] -[ext_resource type="Script" uid="uid://dnu6bnwvhlfut" path="res://scripts/CSharp/Common/FieldBehaviour.cs" id="2_xctjk"] +[ext_resource type="Script" uid="uid://histmmyi1wr" path="res://scripts/CSharp/Common/Farming/FieldBehaviour.cs" id="2_u7egi"] [ext_resource type="Texture2D" uid="uid://lvhbicmwqab5" path="res://art/farm/tilable grounds/böden/fruchtbarer wilder trockender boden.png" id="3_0rx5h"] [ext_resource type="PackedScene" uid="uid://ob04y3syvo0e" path="res://prefabs/interaction_area.tscn" id="4_xc4m0"] @@ -9,7 +9,7 @@ transform = Transform3D(0.5, 0, 0, 0, -2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0) modulate = Color(0.690196, 0.690196, 0.690196, 1) texture = ExtResource("1_2cisk") -script = ExtResource("2_xctjk") +script = ExtResource("2_u7egi") Untilled = ExtResource("3_0rx5h") Tilled = ExtResource("1_2cisk") diff --git a/prefabs/farming/base_plant.tscn b/prefabs/farming/base_plant.tscn index 2d56b8e..b42ddfb 100644 --- a/prefabs/farming/base_plant.tscn +++ b/prefabs/farming/base_plant.tscn @@ -1,21 +1,21 @@ [gd_scene load_steps=6 format=3 uid="uid://bjhj1wa5olwcu"] -[ext_resource type="Script" uid="uid://tm14kfypgn0h" path="res://scripts/CSharp/Common/PlantBehaviour.cs" id="1_1hc8u"] +[ext_resource type="Script" uid="uid://yfnjmuuxs3oq" path="res://scripts/CSharp/Common/Farming/PlantBehaviour.cs" id="1_l3nrf"] [ext_resource type="Texture2D" uid="uid://dtr4uga5uspg" path="res://art/farm/farming/farmobjekte/tomaten/tomaten baby.png" id="2_7tw6v"] [ext_resource type="Texture2D" uid="uid://b2gu6ur2xc7s4" path="res://art/farm/farming/farmobjekte/tomaten/tomaten blume.png" id="3_6u2og"] [ext_resource type="Texture2D" uid="uid://cnwd3mb3jnuxm" path="res://art/farm/farming/farmobjekte/tomaten/teen adulte tomaten.png" id="4_1pcfs"] [ext_resource type="PackedScene" uid="uid://ob04y3syvo0e" path="res://prefabs/interaction_area.tscn" id="5_6kt4q"] [node name="BasePlant" type="Node3D" node_paths=PackedStringArray("_seeds", "_smallPlants", "_bigPlants", "_readyPlants")] -transform = Transform3D(0.5, 0, 0, 0, -2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0) -script = ExtResource("1_1hc8u") +script = ExtResource("1_l3nrf") _seeds = [NodePath("Seeds/TomatoSeed"), NodePath("Seeds/TomatoSeed2"), NodePath("Seeds/TomatoSeed3")] _smallPlants = [NodePath("SmallPlant/01"), NodePath("SmallPlant/02"), NodePath("SmallPlant/03"), NodePath("SmallPlant/04")] _bigPlants = [NodePath("BigPlant/01"), NodePath("BigPlant/02"), NodePath("BigPlant/03"), NodePath("BigPlant/04")] _readyPlants = [NodePath("ReadyPlant/01"), NodePath("ReadyPlant/02"), NodePath("ReadyPlant/03"), NodePath("ReadyPlant/04")] +_state = 1 [node name="Seeds" type="Node3D" parent="."] -transform = Transform3D(5, 0, 0, 0, 5, 0, 0, 0, 5, -0.216614, 1.20629, -0.992401) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.216614, 1.20629, -0.992401) [node name="TomatoSeed" type="Sprite3D" parent="Seeds"] transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0) @@ -48,7 +48,7 @@ region_enabled = true region_rect = Rect2(3, 337, 85, 82) [node name="SmallPlant" type="Node3D" parent="."] -transform = Transform3D(5, 0, 0, 0, 5, 0, 0, 0, 5, 0.844819, 1.20629, -1.44874) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.844819, 1.20629, -1.44874) [node name="01" type="Sprite3D" parent="SmallPlant"] transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.211124, -0.20353, 0.188503) @@ -87,7 +87,7 @@ region_enabled = true region_rect = Rect2(228, 600, 85, 92) [node name="BigPlant" type="Node3D" parent="."] -transform = Transform3D(5, 0, 0, 0, 5, 0, 0, 0, 5, 0.844819, 1.20629, -1.44874) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.844819, 1.20629, -1.44874) [node name="01" type="Sprite3D" parent="BigPlant"] transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.211124, -0.20353, 0.188503) @@ -126,16 +126,15 @@ region_enabled = true region_rect = Rect2(546, 697, 535, 687) [node name="ReadyPlant" type="Node3D" parent="."] -transform = Transform3D(5, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, -3.967) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -3.967) [node name="01" type="Sprite3D" parent="ReadyPlant"] transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0) -visible = false billboard = 1 render_priority = 3 texture = ExtResource("4_1pcfs") region_enabled = true -region_rect = Rect2(399, 35, 678, 796) +region_rect = Rect2(399, 3, 679, 808) [node name="02" type="Sprite3D" parent="ReadyPlant"] transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0) @@ -165,7 +164,7 @@ region_enabled = true region_rect = Rect2(1167, 863, 528, 785) [node name="InteractionArea" parent="." instance=ExtResource("5_6kt4q")] -transform = Transform3D(2.475, 0, 0, 0, 2.475, 0, 0, 0, 2.475, 0, 0, 0) -_showLabel = false [connection signal="Interacted" from="InteractionArea" to="." method="Grow"] + +[editable path="InteractionArea"] diff --git a/prefabs/interaction_area.tscn b/prefabs/interaction_area.tscn index 46e6003..e82f8ec 100644 --- a/prefabs/interaction_area.tscn +++ b/prefabs/interaction_area.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=3 format=3 uid="uid://ob04y3syvo0e"] -[ext_resource type="Script" uid="uid://cgkea4bmd6a8f" path="res://scripts/CSharp/Common/InteractionArea.cs" id="1_b15wn"] +[ext_resource type="Script" uid="uid://dumwt7lledufm" path="res://scripts/CSharp/Common/CharacterControls/InteractionArea.cs" id="1_b15wn"] [sub_resource type="SphereShape3D" id="SphereShape3D_i8sim"] -radius = 1.0 +resource_local_to_scene = true [node name="InteractionArea" type="Node3D" node_paths=PackedStringArray("_area", "_label")] script = ExtResource("1_b15wn") @@ -17,14 +17,15 @@ collision_mask = 16 shape = SubResource("SphereShape3D_i8sim") [node name="Label3D" type="Label3D" parent="."] +visible = false sorting_offset = 100.0 pixel_size = 0.001 billboard = 1 no_depth_test = true fixed_size = true text = "" -font_size = 98 -outline_size = 22 +font_size = 46 +outline_size = 10 [connection signal="body_entered" from="Area3D" to="." method="OnPlayerEntered"] [connection signal="body_exited" from="Area3D" to="." method="OnPlayerExited"] diff --git a/project.godot b/project.godot index 54887aa..51bb62e 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="Babushka" -run/main_scene="res://scenes/testing/abandoned_street_3d.tscn" +run/main_scene="uid://br7yq757cawts" config/features=PackedStringArray("4.4", "C#", "Forward Plus") config/icon="res://icon.svg" diff --git a/scenes/Babushka_scene_farm_vesna.tscn b/scenes/Babushka_scene_farm_vesna.tscn index 8a16aeb..598cc2c 100644 --- a/scenes/Babushka_scene_farm_vesna.tscn +++ b/scenes/Babushka_scene_farm_vesna.tscn @@ -1,8 +1,12 @@ -[gd_scene load_steps=7 format=3 uid="uid://br7yq757cawts"] +[gd_scene load_steps=11 format=3 uid="uid://br7yq757cawts"] [ext_resource type="PackedScene" uid="uid://dbd1niu3tp8y5" path="res://prefabs/Player3D.tscn" id="1_b1ibi"] [ext_resource type="PackedScene" uid="uid://biwd3jj65qrlh" path="res://prefabs/farming/base_field.tscn" id="2_72r8y"] +[ext_resource type="Texture2D" uid="uid://lvhbicmwqab5" path="res://art/farm/tilable grounds/böden/fruchtbarer wilder trockender boden.png" id="3_0ptl4"] [ext_resource type="PackedScene" uid="uid://bjhj1wa5olwcu" path="res://prefabs/farming/base_plant.tscn" id="3_oyw0x"] +[ext_resource type="PackedScene" uid="uid://ob04y3syvo0e" path="res://prefabs/interaction_area.tscn" id="4_r4sre"] +[ext_resource type="Texture2D" uid="uid://c4ggew55w0icj" path="res://art/farm/farming/farmobjekte/harke.png" id="5_0ptl4"] +[ext_resource type="Script" uid="uid://v34pl0nlp4x" path="res://scripts/CSharp/Common/SpriteSwitcher.cs" id="6_jg3xi"] [sub_resource type="PlaneMesh" id="PlaneMesh_8yprl"] @@ -34,6 +38,32 @@ transform = Transform3D(1, 0, 0, 0, 0.618408, 0.785857, 0, -0.785857, 0.618408, [node name="BaseField" parent="." instance=ExtResource("2_72r8y")] transform = Transform3D(0.5, 0, 0, 0, -2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, -2.26145, 0.0702609, 4.04213) +texture = ExtResource("3_0ptl4") [node name="BasePlant" parent="BaseField" instance=ExtResource("3_oyw0x")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0481086, -0.424278, 0.0145219) + +[node name="HoePickup" parent="." instance=ExtResource("4_r4sre")] +transform = Transform3D(0.5, 0, 0, 0, 0.5, -5.32907e-15, 0, 5.32907e-15, 0.5, -4.32699, 2.53562, -3.4472) + +[node name="Hoe on" type="Sprite3D" parent="HoePickup"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.138896, 0) +modulate = Color(0, 0.996078, 0, 1) +billboard = 1 +texture = ExtResource("5_0ptl4") +region_rect = Rect2(484, 143, 365, 1317) + +[node name="Hoe off" type="Sprite3D" parent="HoePickup"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.138896, 0) +visible = false +modulate = Color(1, 0, 0, 1) +billboard = 1 +texture = ExtResource("5_0ptl4") +region_rect = Rect2(421, 0, 539, 965) + +[node name="SpriteSwitcher" type="Node3D" parent="HoePickup" node_paths=PackedStringArray("_TrueSprite", "_FalseSprite")] +script = ExtResource("6_jg3xi") +_TrueSprite = NodePath("../Hoe on") +_FalseSprite = NodePath("../Hoe off") + +[connection signal="Interacted" from="HoePickup" to="HoePickup/SpriteSwitcher" method="SwitchState"] diff --git a/scripts/CSharp/Common/CameraController.cs b/scripts/CSharp/Common/Camera/CameraController.cs similarity index 87% rename from scripts/CSharp/Common/CameraController.cs rename to scripts/CSharp/Common/Camera/CameraController.cs index d3c7c49..b0feb5c 100644 --- a/scripts/CSharp/Common/CameraController.cs +++ b/scripts/CSharp/Common/Camera/CameraController.cs @@ -1,6 +1,6 @@ using Godot; -namespace Babushka.scripts.CSharp.Common; +namespace Babushka.scripts.CSharp.Common.Camera; public partial class CameraController : Camera2D { diff --git a/scripts/CSharp/Common/Camera/CameraController.cs.uid b/scripts/CSharp/Common/Camera/CameraController.cs.uid new file mode 100644 index 0000000..acfb025 --- /dev/null +++ b/scripts/CSharp/Common/Camera/CameraController.cs.uid @@ -0,0 +1 @@ +uid://bqomwxclsbhd3 diff --git a/scripts/CSharp/Common/CameraPivot.cs b/scripts/CSharp/Common/Camera/CameraPivot.cs similarity index 95% rename from scripts/CSharp/Common/CameraPivot.cs rename to scripts/CSharp/Common/Camera/CameraPivot.cs index c0d9f97..3356532 100644 --- a/scripts/CSharp/Common/CameraPivot.cs +++ b/scripts/CSharp/Common/Camera/CameraPivot.cs @@ -1,6 +1,6 @@ using Godot; -namespace Babushka.scripts.CSharp.Common; +namespace Babushka.scripts.CSharp.Common.Camera; public partial class CameraPivot : Node3D { diff --git a/scripts/CSharp/Common/Camera/CameraPivot.cs.uid b/scripts/CSharp/Common/Camera/CameraPivot.cs.uid new file mode 100644 index 0000000..43c21d5 --- /dev/null +++ b/scripts/CSharp/Common/Camera/CameraPivot.cs.uid @@ -0,0 +1 @@ +uid://r5tahuqvbucy diff --git a/scripts/CSharp/Common/InteractionArea.cs b/scripts/CSharp/Common/CharacterControls/InteractionArea.cs similarity index 92% rename from scripts/CSharp/Common/InteractionArea.cs rename to scripts/CSharp/Common/CharacterControls/InteractionArea.cs index 724140f..408f7b1 100644 --- a/scripts/CSharp/Common/InteractionArea.cs +++ b/scripts/CSharp/Common/CharacterControls/InteractionArea.cs @@ -1,6 +1,6 @@ using Godot; -namespace Babushka.scripts.CSharp.Common; +namespace Babushka.scripts.CSharp.Common.CharacterControls; public partial class InteractionArea : Node3D { diff --git a/scripts/CSharp/Common/CharacterControls/InteractionArea.cs.uid b/scripts/CSharp/Common/CharacterControls/InteractionArea.cs.uid new file mode 100644 index 0000000..668195b --- /dev/null +++ b/scripts/CSharp/Common/CharacterControls/InteractionArea.cs.uid @@ -0,0 +1 @@ +uid://dumwt7lledufm diff --git a/scripts/CSharp/Common/Player2D.cs b/scripts/CSharp/Common/CharacterControls/Player2D.cs similarity index 91% rename from scripts/CSharp/Common/Player2D.cs rename to scripts/CSharp/Common/CharacterControls/Player2D.cs index 18e4e84..787088e 100644 --- a/scripts/CSharp/Common/Player2D.cs +++ b/scripts/CSharp/Common/CharacterControls/Player2D.cs @@ -1,6 +1,6 @@ using Godot; -namespace Babushka.scripts.CSharp.Common; +namespace Babushka.scripts.CSharp.Common.CharacterControls; public partial class Player2D : Node2D { diff --git a/scripts/CSharp/Common/CharacterControls/Player2D.cs.uid b/scripts/CSharp/Common/CharacterControls/Player2D.cs.uid new file mode 100644 index 0000000..5257333 --- /dev/null +++ b/scripts/CSharp/Common/CharacterControls/Player2D.cs.uid @@ -0,0 +1 @@ +uid://cjbclkxesh3hc diff --git a/scripts/CSharp/Common/Player3D.cs b/scripts/CSharp/Common/CharacterControls/Player3D.cs similarity index 94% rename from scripts/CSharp/Common/Player3D.cs rename to scripts/CSharp/Common/CharacterControls/Player3D.cs index 90aabf3..d0350e3 100644 --- a/scripts/CSharp/Common/Player3D.cs +++ b/scripts/CSharp/Common/CharacterControls/Player3D.cs @@ -1,6 +1,6 @@ using Godot; -namespace Babushka.scripts.CSharp.Common; +namespace Babushka.scripts.CSharp.Common.CharacterControls; public partial class Player3D : CharacterBody3D { @@ -13,8 +13,6 @@ public partial class Player3D : CharacterBody3D public override void _PhysicsProcess(double delta) { - if (!IsOnFloor()) Velocity += Vector3.Down * (float) delta; - var inputDir = Input.GetVector("move_left", "move_right", "move_up", "move_down"); if (inputDir == Vector2.Zero) return; diff --git a/scripts/CSharp/Common/CharacterControls/Player3D.cs.uid b/scripts/CSharp/Common/CharacterControls/Player3D.cs.uid new file mode 100644 index 0000000..543aed7 --- /dev/null +++ b/scripts/CSharp/Common/CharacterControls/Player3D.cs.uid @@ -0,0 +1 @@ +uid://b4ugrget2x6lb diff --git a/scripts/CSharp/Common/Farming/FarmingControls.cs b/scripts/CSharp/Common/Farming/FarmingControls.cs new file mode 100644 index 0000000..e28286e --- /dev/null +++ b/scripts/CSharp/Common/Farming/FarmingControls.cs @@ -0,0 +1,8 @@ +using Godot; + +namespace Babushka.scripts.CSharp.Common.Farming; + +public partial class FarmingControls : Node3D +{ + +} \ No newline at end of file diff --git a/scripts/CSharp/Common/Farming/FarmingControls.cs.uid b/scripts/CSharp/Common/Farming/FarmingControls.cs.uid new file mode 100644 index 0000000..aba43d3 --- /dev/null +++ b/scripts/CSharp/Common/Farming/FarmingControls.cs.uid @@ -0,0 +1 @@ +uid://b1sscdr4ptec8 diff --git a/scripts/CSharp/Common/FieldBehaviour.cs b/scripts/CSharp/Common/Farming/FieldBehaviour.cs similarity index 94% rename from scripts/CSharp/Common/FieldBehaviour.cs rename to scripts/CSharp/Common/Farming/FieldBehaviour.cs index fde2117..2ac2024 100644 --- a/scripts/CSharp/Common/FieldBehaviour.cs +++ b/scripts/CSharp/Common/Farming/FieldBehaviour.cs @@ -1,6 +1,6 @@ using Godot; -namespace Babushka.scripts.CSharp.Common; +namespace Babushka.scripts.CSharp.Common.Farming; public enum FieldState { diff --git a/scripts/CSharp/Common/Farming/FieldBehaviour.cs.uid b/scripts/CSharp/Common/Farming/FieldBehaviour.cs.uid new file mode 100644 index 0000000..d7d0642 --- /dev/null +++ b/scripts/CSharp/Common/Farming/FieldBehaviour.cs.uid @@ -0,0 +1 @@ +uid://histmmyi1wr diff --git a/scripts/CSharp/Common/PlantBehaviour.cs b/scripts/CSharp/Common/Farming/PlantBehaviour.cs similarity index 97% rename from scripts/CSharp/Common/PlantBehaviour.cs rename to scripts/CSharp/Common/Farming/PlantBehaviour.cs index 9519f42..a11aad5 100644 --- a/scripts/CSharp/Common/PlantBehaviour.cs +++ b/scripts/CSharp/Common/Farming/PlantBehaviour.cs @@ -1,7 +1,7 @@ using System; using Godot; -namespace Babushka.scripts.CSharp.Common; +namespace Babushka.scripts.CSharp.Common.Farming; public enum PlantState { diff --git a/scripts/CSharp/Common/Farming/PlantBehaviour.cs.uid b/scripts/CSharp/Common/Farming/PlantBehaviour.cs.uid new file mode 100644 index 0000000..18e2f2e --- /dev/null +++ b/scripts/CSharp/Common/Farming/PlantBehaviour.cs.uid @@ -0,0 +1 @@ +uid://yfnjmuuxs3oq diff --git a/scripts/CSharp/Common/SpriteSwitcher.cs b/scripts/CSharp/Common/SpriteSwitcher.cs new file mode 100644 index 0000000..92f07ea --- /dev/null +++ b/scripts/CSharp/Common/SpriteSwitcher.cs @@ -0,0 +1,36 @@ +using Godot; + +namespace Babushka.scripts.CSharp.Common; + +/// +/// Switches between two Sprite Options. +/// +public partial class SpriteSwitcher : Node3D +{ + [Export] private Sprite3D _TrueSprite; + [Export] private Sprite3D _FalseSprite; + [Export] private bool _state = true; + + public override void _Ready() + { + SetState(); + } + + public void SwitchState() + { + _state = !_state; + SetState(); + } + + private void SetState() + { + if (_state) + { + _TrueSprite.Visible = true; + } + else + { + _FalseSprite.Visible = false; + } + } +} \ No newline at end of file diff --git a/scripts/CSharp/Common/SpriteSwitcher.cs.uid b/scripts/CSharp/Common/SpriteSwitcher.cs.uid new file mode 100644 index 0000000..8893976 --- /dev/null +++ b/scripts/CSharp/Common/SpriteSwitcher.cs.uid @@ -0,0 +1 @@ +uid://v34pl0nlp4x