Creating new plantable fields works

pull/3/head
kziolkowski 9 months ago
parent 45a58f701b
commit bd4f7edc20

@ -1,7 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://biwd3jj65qrlh"]
[gd_scene load_steps=6 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="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"]
[sub_resource type="SphereShape3D" id="SphereShape3D_u7egi"]
@ -18,13 +19,16 @@ _showLabel = false
shape = SubResource("SphereShape3D_u7egi")
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
transform = Transform3D(0.5, 0, 0, 0, -2.18557e-08, -0.5, 0, 0.5, -2.18557e-08, 0, 0, 0)
pixel_size = 0.004
texture = ExtResource("1_2cisk")
script = ExtResource("2_u7egi")
Tilled = ExtResource("1_2cisk")
FieldState = 1
[connection signal="Interacted" from="InteractionArea" to="." method="Farm"]
[node name="BasePlant" parent="Sprite3D" 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"]
[editable path="InteractionArea"]

@ -1,8 +1,7 @@
[gd_scene load_steps=10 format=3 uid="uid://br7yq757cawts"]
[gd_scene load_steps=9 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="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="PackedScene" uid="uid://cf0jpuio8tgim" path="res://prefabs/interactions/sprite_switcher.tscn" id="6_r4sre"]
@ -42,10 +41,6 @@ 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, 0.5, 0, 0, 0, 0.5, 0, 0.001, 0)
[node name="BasePlant" parent="BaseField" instance=ExtResource("3_oyw0x")]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0)
top_level = true
[node name="HoePickup" parent="." instance=ExtResource("4_r4sre")]
transform = Transform3D(1, 0, 0, 0, 1, -1.06581e-14, 0, 1.06581e-14, 1, -4.327, 1.5, -3.447)

@ -24,11 +24,6 @@ public partial class FarmingControls : Node3D
}
}
public override void _Notification(int notification)
{
GD.Print("Player global position: " + _movingPlayer.GlobalPosition);
}
private void MakeField()
{
if(_fieldParent == null || _fieldPrefab == null)

Loading…
Cancel
Save