Basic watering functionality implemented

This commit is contained in:
2025-04-24 23:36:23 +02:00
parent 7e19268847
commit 339428c312
11 changed files with 91 additions and 69 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[gd_scene load_steps=5 format=3 uid="uid://cgjc4wurbgimy"]
[ext_resource type="Script" uid="uid://b7vlkecrn0t5c" path="res://scripts/CSharp/Common/Inventory/InventoryUi.cs" id="1_6wusm"]
[ext_resource type="Script" uid="uid://hg7jay2kt441" path="res://scripts/CSharp/Common/Inventory/InventoryUi.cs" id="1_6wusm"]
[ext_resource type="Script" uid="uid://b2jhdxcrhtm2d" path="res://scripts/CSharp/Common/Inventory/InventoryTestScript.cs" id="3_exrk4"]
[ext_resource type="Resource" uid="uid://datee0flk1e84" path="res://resources/items/pickaxe.tres" id="4_5fdxq"]
[ext_resource type="Texture2D" uid="uid://c7wqla0mbu3np" path="res://graphics/ui/babushka_ui_tmp_inventory_select.png" id="4_tiss4"]
+10 -6
View File
@@ -1,7 +1,8 @@
[gd_scene load_steps=6 format=3 uid="uid://biwd3jj65qrlh"]
[gd_scene load_steps=7 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://histmmyi1wr" path="res://scripts/CSharp/Common/Farming/FieldBehaviour.cs" id="2_u7egi"]
[ext_resource type="Texture2D" uid="uid://ctvdxwgmfaj5c" path="res://art/farm/tilable grounds/böden/nasse farming erde.png" id="4_lsseu"]
[ext_resource type="PackedScene" uid="uid://bjhj1wa5olwcu" path="res://prefabs/farming/base_plant.tscn" id="4_u7egi"]
[ext_resource type="PackedScene" uid="uid://ob04y3syvo0e" path="res://prefabs/interaction_area.tscn" id="4_xc4m0"]
@@ -18,17 +19,20 @@ _showLabel = false
[node name="CollisionShape3D" parent="InteractionArea/Area3D" index="0"]
shape = SubResource("SphereShape3D_u7egi")
[node name="Sprite3D" type="Sprite3D" parent="."]
[node name="FieldBehaviour" type="Sprite3D" parent="."]
transform = Transform3D(0.4, 0, 0, 0, -1.74846e-08, -0.4, 0, 0.4, -1.74846e-08, 0, 0, 0)
pixel_size = 0.004
texture = ExtResource("1_2cisk")
script = ExtResource("2_u7egi")
Tilled = ExtResource("1_2cisk")
Watered = ExtResource("4_lsseu")
FieldState = 1
metadata/_custom_type_script = "uid://histmmyi1wr"
[node name="BasePlant" parent="Sprite3D" instance=ExtResource("4_u7egi")]
[node name="BasePlant" parent="FieldBehaviour" node_paths=PackedStringArray("_seeds", "_smallPlants", "_bigPlants", "_readyPlants") instance=ExtResource("4_u7egi")]
transform = Transform3D(0.5, 0, 0, 0, -2.18557e-08, 0.5, 0, -0.5, -2.18557e-08, 0, 0, 0)
[connection signal="Interacted" from="InteractionArea" to="Sprite3D/BasePlant" method="Grow"]
_seeds = [null, null, null]
_smallPlants = [null, null, null, null]
_bigPlants = [null, null, null, null]
_readyPlants = [null, null, null, null]
[editable path="InteractionArea"]