1
Fork 0
mirror of https://github.com/Steffo99/pineapple-surf.git synced 2024-11-28 18:54:19 +00:00

Fix crops not getting picked up by player

This commit is contained in:
Ichicoro 2023-01-08 13:51:21 +01:00
parent 6cd3a85825
commit a9a0c76cd6
4 changed files with 15 additions and 18 deletions

View file

@ -6,10 +6,10 @@
[ext_resource type="AudioStream" uid="uid://lkftwgdun745" path="res://assets/pop.wav" id="3_gur2a"] [ext_resource type="AudioStream" uid="uid://lkftwgdun745" path="res://assets/pop.wav" id="3_gur2a"]
[ext_resource type="Script" path="res://island/Pop.gd" id="4_5e7wk"] [ext_resource type="Script" path="res://island/Pop.gd" id="4_5e7wk"]
[sub_resource type="BoxShape3D" id="BoxShape3D_65i68"] [sub_resource type="BoxShape3D" id="BoxShape3D_rkrm1"]
size = Vector3(1, 0.1, 1) size = Vector3(1, 0.1, 1)
[sub_resource type="ArrayMesh" id="ArrayMesh_8e1gk"] [sub_resource type="ArrayMesh" id="ArrayMesh_t1otr"]
_surfaces = [{ _surfaces = [{
"aabb": AABB(-0.5, 0, -0.5, 1.00001, 1.00001, 1), "aabb": AABB(-0.5, 0, -0.5, 1.00001, 1.00001, 1),
"attribute_data": PackedByteArray(143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 31, 133, 107, 63, 183, 109, 91, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63), "attribute_data": PackedByteArray(143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 31, 133, 107, 63, 183, 109, 91, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63, 143, 194, 117, 63, 183, 109, 91, 63, 31, 133, 107, 63, 183, 109, 91, 63, 31, 133, 107, 63, 219, 182, 109, 63, 143, 194, 117, 63, 219, 182, 109, 63),
@ -32,14 +32,16 @@ script = ExtResource("2_jejoo")
[node name="Plant" type="Area3D" parent="."] [node name="Plant" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0, 0.5) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0, 0.5)
collision_layer = 0
collision_mask = 16
[node name="PlantableArea" type="CollisionShape3D" parent="Plant"] [node name="PlantableArea" type="CollisionShape3D" parent="Plant"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
shape = SubResource("BoxShape3D_65i68") shape = SubResource("BoxShape3D_rkrm1")
[node name="Sprout" type="MeshInstance3D" parent="Plant"] [node name="Sprout" type="MeshInstance3D" parent="Plant"]
transform = Transform3D(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) transform = Transform3D(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
mesh = SubResource("ArrayMesh_8e1gk") mesh = SubResource("ArrayMesh_t1otr")
skeleton = NodePath("../../..") skeleton = NodePath("../../..")
[node name="GrowthTimer" type="Timer" parent="."] [node name="GrowthTimer" type="Timer" parent="."]

View file

@ -8,7 +8,7 @@
[ext_resource type="PackedScene" uid="uid://cxa5irr1atgke" path="res://island/PyramidSmallMesh.tscn" id="5_uf8hd"] [ext_resource type="PackedScene" uid="uid://cxa5irr1atgke" path="res://island/PyramidSmallMesh.tscn" id="5_uf8hd"]
[ext_resource type="PackedScene" uid="uid://bknwefv5ycc3u" path="res://island/PyramidSmolMesh.tscn" id="6_klmt8"] [ext_resource type="PackedScene" uid="uid://bknwefv5ycc3u" path="res://island/PyramidSmolMesh.tscn" id="6_klmt8"]
[ext_resource type="PackedScene" uid="uid://boxtb3trgcy8c" path="res://island/PillarMesh.tscn" id="7_grmwj"] [ext_resource type="PackedScene" uid="uid://boxtb3trgcy8c" path="res://island/PillarMesh.tscn" id="7_grmwj"]
[ext_resource type="PackedScene" uid="uid://cwf11kdk7t64k" path="res://island/HoppityMesh.tscn" id="8_5pio0"] [ext_resource type="PackedScene" path="res://island/HoppityMesh.tscn" id="8_5pio0"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_3uyyi"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_3uyyi"]
render_priority = 0 render_priority = 0

View file

@ -5,15 +5,15 @@
[ext_resource type="AudioStream" uid="uid://lkftwgdun745" path="res://assets/pop.wav" id="3_b3ttd"] [ext_resource type="AudioStream" uid="uid://lkftwgdun745" path="res://assets/pop.wav" id="3_b3ttd"]
[ext_resource type="Script" path="res://island/Pop.gd" id="4_rn5e2"] [ext_resource type="Script" path="res://island/Pop.gd" id="4_rn5e2"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_xodvb"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_3af3s"]
height = 0.9 height = 0.9
radius = 0.3 radius = 0.3
[sub_resource type="CylinderShape3D" id="CylinderShape3D_fghe6"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_77mmo"]
height = 6.0 height = 6.0
radius = 3.0 radius = 3.0
[sub_resource type="CylinderShape3D" id="CylinderShape3D_j5xpy"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_x36gm"]
height = 1.4 height = 1.4
radius = 0.7 radius = 0.7
@ -25,7 +25,7 @@ linear_damp = 1.0
[node name="Shape" type="CollisionShape3D" parent="."] [node name="Shape" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.45, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.45, 0)
shape = SubResource("CylinderShape3D_xodvb") shape = SubResource("CylinderShape3D_3af3s")
[node name="PineappleMesh" parent="." instance=ExtResource("1_ndmmp")] [node name="PineappleMesh" parent="." instance=ExtResource("1_ndmmp")]
@ -46,16 +46,16 @@ monitorable = false
[node name="Shape" type="CollisionShape3D" parent="MoveTowardsPlayer/MagnetArea"] [node name="Shape" type="CollisionShape3D" parent="MoveTowardsPlayer/MagnetArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
shape = SubResource("CylinderShape3D_fghe6") shape = SubResource("CylinderShape3D_77mmo")
[node name="CaptureArea" type="Area3D" parent="MoveTowardsPlayer"] [node name="CaptureArea" type="Area3D" parent="MoveTowardsPlayer"]
collision_layer = 0 collision_layer = 0
collision_mask = 0 collision_mask = 4
monitorable = false monitorable = false
[node name="Shape" type="CollisionShape3D" parent="MoveTowardsPlayer/CaptureArea"] [node name="Shape" type="CollisionShape3D" parent="MoveTowardsPlayer/CaptureArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
shape = SubResource("CylinderShape3D_j5xpy") shape = SubResource("CylinderShape3D_x36gm")
[connection signal="body_entered" from="MoveTowardsPlayer/MagnetArea" to="MoveTowardsPlayer" method="_on_magnet_area_body_entered"] [connection signal="body_entered" from="MoveTowardsPlayer/MagnetArea" to="MoveTowardsPlayer" method="_on_magnet_area_body_entered"]
[connection signal="body_entered" from="MoveTowardsPlayer/CaptureArea" to="MoveTowardsPlayer" method="_on_capture_area_body_entered"] [connection signal="body_entered" from="MoveTowardsPlayer/CaptureArea" to="MoveTowardsPlayer" method="_on_capture_area_body_entered"]

View file

@ -129,7 +129,6 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
[node name="CameraViewportContainer" type="SubViewportContainer" parent="Head/Viewport"] [node name="CameraViewportContainer" type="SubViewportContainer" parent="Head/Viewport"]
layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
@ -169,7 +168,6 @@ theme = SubResource("Theme_smyke")
[node name="FPS_Label" type="Label" parent="HUD"] [node name="FPS_Label" type="Label" parent="HUD"]
visible = false visible = false
layout_mode = 1
anchors_preset = 1 anchors_preset = 1
anchor_left = 1.0 anchor_left = 1.0
anchor_right = 1.0 anchor_right = 1.0
@ -182,7 +180,7 @@ horizontal_alignment = 2
script = SubResource("GDScript_iiadi") script = SubResource("GDScript_iiadi")
[node name="PointsSpawner" type="Control" parent="HUD"] [node name="PointsSpawner" type="Control" parent="HUD"]
layout_mode = 1 layout_mode = 3
anchors_preset = 8 anchors_preset = 8
anchor_left = 0.5 anchor_left = 0.5
anchor_top = 0.5 anchor_top = 0.5
@ -193,7 +191,6 @@ grow_vertical = 2
script = SubResource("GDScript_5d122") script = SubResource("GDScript_5d122")
[node name="AmmoLabel" type="Label" parent="HUD"] [node name="AmmoLabel" type="Label" parent="HUD"]
layout_mode = 1
anchors_preset = 3 anchors_preset = 3
anchor_left = 1.0 anchor_left = 1.0
anchor_top = 1.0 anchor_top = 1.0
@ -218,7 +215,6 @@ metadata/_edit_lock_ = true
[node name="SubViewportContainer" type="SubViewportContainer" parent="HUD"] [node name="SubViewportContainer" type="SubViewportContainer" parent="HUD"]
visible = false visible = false
show_behind_parent = true show_behind_parent = true
layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
@ -241,7 +237,6 @@ MainCamera = NodePath("../../../../Head/Viewport/CameraViewportContainer/GameVie
[node name="Crosshair" type="ColorRect" parent="HUD"] [node name="Crosshair" type="ColorRect" parent="HUD"]
material = SubResource("ShaderMaterial_2p6rt") material = SubResource("ShaderMaterial_2p6rt")
layout_mode = 1
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0