Updated dinner table to allow player to consume valid food

This commit is contained in:
akshay committed 2022-08-16 20:31:51 -04:00
1 parent c6da4e0aa2
commit 8d313b8a71
4 files changed
+55 -3

No files matched your search

+1
View File
@@ -73,6 +73,7 @@ ssao_enabled = true
[node name="Player" parent="." instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5.27448 )
hunger_tick_time = 10.0
[node name="cameras" type="Spatial" parent="."]
script = ExtResource( 10 )
+17 -2
View File
@@ -1,6 +1,10 @@
[gd_scene load_steps=5 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://scenes/item_holder.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/dinner_table.gd" type="Script" id=2]
[ext_resource path="res://item_types/cooked_yam.tres" type="Resource" id=3]
[sub_resource type="SphereShape" id=4]
[sub_resource type="CylinderMesh" id=1]
height = 0.1
@@ -15,7 +19,15 @@ radial_segments = 16
[sub_resource type="CylinderShape" id=3]
height = 0.87498
[node name="dinner_table" type="Spatial"]
[node name="dinner_table" type="Area"]
collision_layer = 8
collision_mask = 4
script = ExtResource( 2 )
all_food = [ ExtResource( 3 ) ]
[node name="TriggerVolume" type="CollisionShape" parent="."]
transform = Transform( 1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, 0, 0, 0 )
shape = SubResource( 4 )
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.648164, 0 )
@@ -44,4 +56,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.439889, 0 )
shape = SubResource( 3 )
[node name="item_holder" parent="." instance=ExtResource( 1 )]
unique_name_in_owner = true
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.776869, 0 )
[connection signal="item_changed" from="item_holder" to="." method="_on_item_holder_item_changed"]