Compare commits
6 Commits
jon_multi
...
e4403e4a50
| Author | SHA1 | Date | |
|---|---|---|---|
| e4403e4a50 | |||
| 19207e7f72 | |||
| e9a7786cab | |||
| 9cdf0fc787 | |||
| d71f3824cf | |||
| dfc081de3b |
@@ -1,14 +1,14 @@
|
||||
[gd_scene format=3 uid="uid://bp3v1jl8pctro"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bfrlpbsqg5lqr" path="res://addons/godot-xr-tools/objects/pickable.gd" id="1_nq5sa"]
|
||||
[ext_resource type="PackedScene" uid="uid://du31pqeytu8as" path="res://Containers/container.tscn" id="1_s5yhh"]
|
||||
[ext_resource type="Script" uid="uid://iqjqsk4v6qfh" path="res://Containers/plate_controller.gd" id="1_vjsmi"]
|
||||
[ext_resource type="PackedScene" uid="uid://du31pqeytu8as" path="res://containers/container.tscn" id="1_s5yhh"]
|
||||
[ext_resource type="Script" uid="uid://iqjqsk4v6qfh" path="res://containers/plate_controller.gd" id="1_vjsmi"]
|
||||
[ext_resource type="PackedScene" uid="uid://c25yxb0vt53vc" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_left.tscn" id="2_3bkoa"]
|
||||
[ext_resource type="Animation" uid="uid://db62hs5s4n2b3" path="res://addons/godot-xr-tools/hands/animations/left/Grip 4.res" id="3_6v47p"]
|
||||
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="4_dhtvl"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="5_vlcpl"]
|
||||
[ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_el51w"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://net/net_pickable.gd" id="20_netpk"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_kek77"]
|
||||
height = 0.0635376
|
||||
@@ -49,6 +49,7 @@ collision_layer = 4
|
||||
collision_mask = 196615
|
||||
freeze_mode = 1
|
||||
script = ExtResource("1_nq5sa")
|
||||
second_hand_grab = 1
|
||||
|
||||
[node name="PlateController" type="Node" parent="." unique_id=1503264193]
|
||||
script = ExtResource("1_vjsmi")
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="4_wb51u"]
|
||||
[ext_resource type="PackedScene" uid="uid://c25yxb0vt53vc" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_left.tscn" id="5_wqyr2"]
|
||||
[ext_resource type="Animation" uid="uid://bediglpx0rj7i" path="res://addons/godot-xr-tools/hands/animations/left/Grip 5.res" id="6_ftab3"]
|
||||
[ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://Prefabs/combinable_item.tscn" id="7_wb51u"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="8_t9y3x"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_46e7r"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"]
|
||||
[ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://prefabs/combinable_item.tscn" id="7_wb51u"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://prefabs/food_item.tscn" id="8_t9y3x"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://prefabs/despawning_item.tscn" id="10_46e7r"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://net/net_pickable.gd" id="20_netpk"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_vlqg6"]
|
||||
height = 0.10708985
|
||||
@@ -40,6 +40,7 @@ properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
|
||||
[node name="BurgerBuns" unique_id=1088240294 instance=ExtResource("1_g1t48")]
|
||||
second_hand_grab = 1
|
||||
|
||||
[node name="CollisionShape3D" parent="." index="0"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05776599, 0)
|
||||
|
||||
+5
-4
@@ -6,10 +6,10 @@
|
||||
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="4_mgacb"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="5_vw7i6"]
|
||||
[ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_cp3eg"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="7_mde49"]
|
||||
[ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://Prefabs/combinable_item.tscn" id="8_wmrff"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_6ypk4"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://prefabs/food_item.tscn" id="7_mde49"]
|
||||
[ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://prefabs/combinable_item.tscn" id="8_wmrff"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://prefabs/despawning_item.tscn" id="10_6ypk4"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://net/net_pickable.gd" id="20_netpk"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_gkni8"]
|
||||
height = 0.1
|
||||
@@ -46,6 +46,7 @@ properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
|
||||
[node name="PickableObject" unique_id=1675596942 instance=ExtResource("1_r73y2")]
|
||||
second_hand_grab = 1
|
||||
|
||||
[node name="CollisionShape3D" parent="." index="0"]
|
||||
shape = SubResource("CylinderShape3D_gkni8")
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="4_hc3f7"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="5_a0a5b"]
|
||||
[ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_bdp75"]
|
||||
[ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://Prefabs/combinable_item.tscn" id="7_bdp75"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_uygc5"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="11_vjw41"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"]
|
||||
[ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://prefabs/combinable_item.tscn" id="7_bdp75"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://prefabs/despawning_item.tscn" id="10_uygc5"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://prefabs/food_item.tscn" id="11_vjw41"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://net/net_pickable.gd" id="20_netpk"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_m1xbq"]
|
||||
size = Vector3(0.1, 0.1, 0.1)
|
||||
@@ -43,6 +43,7 @@ properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
|
||||
[node name="PickableObject" unique_id=1675596942 groups=["platalbe_item"] instance=ExtResource("1_dbtw8")]
|
||||
second_hand_grab = 1
|
||||
|
||||
[node name="CollisionShape3D" parent="." index="0"]
|
||||
shape = SubResource("BoxShape3D_m1xbq")
|
||||
|
||||
+5
-4
@@ -1,15 +1,15 @@
|
||||
[gd_scene format=3 uid="uid://dpot5qie20vf6"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c8l60rnugru40" path="res://addons/godot-xr-tools/objects/pickable.tscn" id="1_fco8w"]
|
||||
[ext_resource type="Texture2D" uid="uid://cexxfyw03hr81" path="res://Textures/1.png" id="2_r8jvx"]
|
||||
[ext_resource type="Texture2D" uid="uid://cexxfyw03hr81" path="res://textures/1.png" id="2_r8jvx"]
|
||||
[ext_resource type="PackedScene" uid="uid://c25yxb0vt53vc" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_left.tscn" id="3_qixic"]
|
||||
[ext_resource type="Animation" uid="uid://db62hs5s4n2b3" path="res://addons/godot-xr-tools/hands/animations/left/Grip 4.res" id="4_bw8vh"]
|
||||
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="5_w8sii"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="6_mvnl5"]
|
||||
[ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="7_wqxjj"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_l4hsd"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="10_yxtxs"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://prefabs/despawning_item.tscn" id="10_l4hsd"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://prefabs/food_item.tscn" id="10_yxtxs"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://net/net_pickable.gd" id="20_netpk"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_fco8w"]
|
||||
height = 0.0338974
|
||||
@@ -40,6 +40,7 @@ properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
|
||||
[node name="raw_burger" unique_id=1675596942 instance=ExtResource("1_fco8w")]
|
||||
second_hand_grab = 1
|
||||
|
||||
[node name="CollisionShape3D" parent="." index="0"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.00077831745, 0)
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="5_ychvb"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="6_etdv2"]
|
||||
[ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="7_rl64h"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="10_6p8pj"]
|
||||
[ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://Prefabs/combinable_item.tscn" id="10_ut7mg"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="10_zz42p"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://prefabs/despawning_item.tscn" id="10_6p8pj"]
|
||||
[ext_resource type="PackedScene" uid="uid://3lr2dhy62rhk" path="res://prefabs/combinable_item.tscn" id="10_ut7mg"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://prefabs/food_item.tscn" id="10_zz42p"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://net/net_pickable.gd" id="20_netpk"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_fco8w"]
|
||||
height = 0.04777527
|
||||
@@ -40,6 +40,7 @@ properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
|
||||
[node name="CookedBurger" unique_id=1675596942 instance=ExtResource("1_ut7mg")]
|
||||
second_hand_grab = 1
|
||||
|
||||
[node name="CollisionShape3D" parent="." index="0"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0072289705, 0)
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
[ext_resource type="Script" uid="uid://dvobm6vcfnqe8" path="res://addons/godot-xr-tools/hands/poses/hand_pose_settings.gd" id="4_cljtj"]
|
||||
[ext_resource type="PackedScene" uid="uid://ctw7nbntd5pcj" path="res://addons/godot-xr-tools/objects/grab_points/grab_point_hand_right.tscn" id="5_dunns"]
|
||||
[ext_resource type="Animation" uid="uid://d1xnpyc08njjx" path="res://addons/godot-xr-tools/hands/animations/right/Grip 4.res" id="6_fh0f6"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://Prefabs/food_item.tscn" id="7_yy3y8"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://Prefabs/despawning_item.tscn" id="9_ej8jm"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://Net/net_pickable.gd" id="20_netpk"]
|
||||
[ext_resource type="PackedScene" uid="uid://bfj80jh13t6e5" path="res://prefabs/food_item.tscn" id="7_yy3y8"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5ukku8i0hilb" path="res://prefabs/despawning_item.tscn" id="9_ej8jm"]
|
||||
[ext_resource type="Script" uid="uid://bwd0pe2udb5xo" path="res://net/net_pickable.gd" id="20_netpk"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_fco8w"]
|
||||
height = 0.10392761
|
||||
@@ -43,6 +43,7 @@ properties/2/replication_mode = 1
|
||||
|
||||
[node name="Hamburger" unique_id=1675596942 groups=["platalbe_item"] instance=ExtResource("1_3gf3l")]
|
||||
gravity_scale = 0.04
|
||||
second_hand_grab = 1
|
||||
|
||||
[node name="CollisionShape3D" parent="." index="0"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.02, 0.02, 0)
|
||||
|
||||
+21
-18
@@ -1,22 +1,22 @@
|
||||
[gd_scene format=3 uid="uid://do6mrslyqe5qe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d1cefhe3yyyds" path="res://Scenes/multiplayer_world.gd" id="1_57ppd"]
|
||||
[ext_resource type="Script" uid="uid://d1cefhe3yyyds" path="res://scenes/multiplayer_world.gd" id="1_57ppd"]
|
||||
[ext_resource type="PackedScene" uid="uid://j5s5wus7tuhb" path="res://XROrigin.tscn" id="2_o1b3t"]
|
||||
[ext_resource type="Material" uid="uid://cmia50cfqxxo4" path="res://Textures/dev_material_3d.tres" id="3_irf4n"]
|
||||
[ext_resource type="PackedScene" uid="uid://j7caslh27nor" path="res://Stations/Hob.tscn" id="4_ctden"]
|
||||
[ext_resource type="Script" uid="uid://ctsqvhicswj8m" path="res://Scenes/add_spawnables.gd" id="5_n8fyw"]
|
||||
[ext_resource type="Sky" uid="uid://c1abtpwhdm2d5" path="res://Textures/sky/NightSkyHDRI009_16K.tres" id="7_n8fyw"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6rift56ql3f8" path="res://Stations/BurgerBunsDispenser.tscn" id="9_sq0s2"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwnwo4i28upap" path="res://Stations/raw_burger_dispenser.tscn" id="11_ctden"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbg7dwsbxxh1t" path="res://Scenes/cube_side_dispense.tscn" id="12_57ppd"]
|
||||
[ext_resource type="PackedScene" uid="uid://ck5tuftqmyiue" path="res://Stations/plate_dispenser.tscn" id="13_irf4n"]
|
||||
[ext_resource type="PackedScene" uid="uid://dvrk268s7gkxh" path="res://Stations/sink.tscn" id="13_o1b3t"]
|
||||
[ext_resource type="Material" uid="uid://cmia50cfqxxo4" path="res://textures/dev_material_3d.tres" id="3_irf4n"]
|
||||
[ext_resource type="PackedScene" uid="uid://j7caslh27nor" path="res://stations/Hob.tscn" id="4_ctden"]
|
||||
[ext_resource type="Script" uid="uid://ctsqvhicswj8m" path="res://scenes/add_spawnables.gd" id="5_n8fyw"]
|
||||
[ext_resource type="Sky" uid="uid://c1abtpwhdm2d5" path="res://textures/sky/NightSkyHDRI009_16K.tres" id="7_n8fyw"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6rift56ql3f8" path="res://stations/BurgerBunsDispenser.tscn" id="9_sq0s2"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwnwo4i28upap" path="res://stations/raw_burger_dispenser.tscn" id="11_ctden"]
|
||||
[ext_resource type="PackedScene" uid="uid://bbg7dwsbxxh1t" path="res://scenes/cube_side_dispense.tscn" id="12_57ppd"]
|
||||
[ext_resource type="PackedScene" uid="uid://ck5tuftqmyiue" path="res://stations/plate_dispenser.tscn" id="13_irf4n"]
|
||||
[ext_resource type="PackedScene" uid="uid://dvrk268s7gkxh" path="res://stations/sink.tscn" id="13_o1b3t"]
|
||||
[ext_resource type="PackedScene" uid="uid://clujaf3u776a3" path="res://addons/godot-xr-tools/objects/viewport_2d_in_3d.tscn" id="14_di04w"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnjwtnhwh0i8q" path="res://Stations/dirt_station.tscn" id="14_irf4n"]
|
||||
[ext_resource type="PackedScene" uid="uid://efaec6ymgabo" path="res://Stations/Counter.tscn" id="15_di04w"]
|
||||
[ext_resource type="PackedScene" uid="uid://xtcei2uvd5li" path="res://UI/game_over_panel.tscn" id="15_eoxxy"]
|
||||
[ext_resource type="PackedScene" uid="uid://caf0xanmxbshy" path="res://Stations/table.tscn" id="16_di04w"]
|
||||
[ext_resource type="Script" uid="uid://cwijoksyou1ey" path="res://Scenes/GameOvercontroler.gd" id="16_n8fyw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnjwtnhwh0i8q" path="res://stations/dirt_station.tscn" id="14_irf4n"]
|
||||
[ext_resource type="PackedScene" uid="uid://efaec6ymgabo" path="res://stations/Counter.tscn" id="15_di04w"]
|
||||
[ext_resource type="PackedScene" uid="uid://xtcei2uvd5li" path="res://ui/game_over_panel.tscn" id="15_eoxxy"]
|
||||
[ext_resource type="PackedScene" uid="uid://caf0xanmxbshy" path="res://stations/table.tscn" id="16_di04w"]
|
||||
[ext_resource type="Script" uid="uid://cwijoksyou1ey" path="res://scenes/GameOvercontroler.gd" id="16_n8fyw"]
|
||||
|
||||
[sub_resource type="Environment" id="Environment_bvwq1"]
|
||||
background_mode = 2
|
||||
@@ -47,7 +47,7 @@ script = ExtResource("1_57ppd")
|
||||
environment = SubResource("Environment_bvwq1")
|
||||
|
||||
[node name="XROrigin3D" parent="." unique_id=2055526621 groups=["local_xr_origin"] instance=ExtResource("2_o1b3t")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.9667189, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.0094595, 0.9667189, -0.15640831)
|
||||
|
||||
[node name="WorldContent" type="Node3D" parent="." unique_id=262398468]
|
||||
|
||||
@@ -100,11 +100,14 @@ primary_duration = 35.0
|
||||
[node name="Hob" parent="." unique_id=1687971542 instance=ExtResource("4_ctden")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.35077858, 0.50655985, -1.2833805)
|
||||
|
||||
[node name="Hob2" parent="." unique_id=1368146287 instance=ExtResource("4_ctden")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.24922144, 0.50655985, -1.2833805)
|
||||
|
||||
[node name="Sink" parent="." unique_id=2055277359 instance=ExtResource("13_o1b3t")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.24685252, 0.51461196, -1.2828919)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.84685254, 0.51461196, -1.2828919)
|
||||
|
||||
[node name="DirtStation" parent="." unique_id=160842153 instance=ExtResource("14_irf4n")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.7978771, 0.50655985, -1.2598276)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.3978771, 0.50655985, -1.2598276)
|
||||
|
||||
[node name="Counter" parent="." unique_id=1487893288 instance=ExtResource("15_di04w")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.94890714, 0.5115015, -1.3041471)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[gd_scene format=3 uid="uid://c30i6h32w8p47"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d1cefhe3yyyds" path="res://Scenes/multiplayer_world.gd" id="1_kdan8"]
|
||||
[ext_resource type="Script" uid="uid://d1cefhe3yyyds" path="res://scenes/multiplayer_world.gd" id="1_kdan8"]
|
||||
[ext_resource type="PackedScene" uid="uid://j5s5wus7tuhb" path="res://XROrigin.tscn" id="2_g30gi"]
|
||||
[ext_resource type="Material" uid="uid://cmia50cfqxxo4" path="res://Textures/dev_material_3d.tres" id="3_75ecy"]
|
||||
[ext_resource type="Sky" uid="uid://c1abtpwhdm2d5" path="res://Textures/sky/NightSkyHDRI009_16K.tres" id="5_c3xgf"]
|
||||
[ext_resource type="Material" uid="uid://cmia50cfqxxo4" path="res://textures/dev_material_3d.tres" id="3_75ecy"]
|
||||
[ext_resource type="Sky" uid="uid://c1abtpwhdm2d5" path="res://textures/sky/NightSkyHDRI009_16K.tres" id="5_c3xgf"]
|
||||
[ext_resource type="Script" uid="uid://biu4qr3nr1eny" path="res://test/mp_test_driver.gd" id="99_mptst"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_vlqg6"]
|
||||
@@ -76,5 +76,5 @@ shape = SubResource("BoxShape3D_arao0")
|
||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 7.502467, 9.197384, -0.018813023)
|
||||
shape = SubResource("BoxShape3D_arao0")
|
||||
|
||||
[node name="TestDriver" type="Node" parent="."]
|
||||
[node name="TestDriver" type="Node" parent="." unique_id=580575192]
|
||||
script = ExtResource("99_mptst")
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://mmasxwqyqmib"
|
||||
path="res://.godot/imported/220175__gameaudio__pop-click.wav-1330523e09eacb15d341a14b80e4481e.sample"
|
||||
path="res://.godot/imported/220175__gameaudio__pop-click.wav-6ef2d3317a82c347b715936ede79653a.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220175__gameaudio__pop-click.wav"
|
||||
dest_files=["res://.godot/imported/220175__gameaudio__pop-click.wav-1330523e09eacb15d341a14b80e4481e.sample"]
|
||||
source_file="res://sounds/220175__gameaudio__pop-click.wav"
|
||||
dest_files=["res://.godot/imported/220175__gameaudio__pop-click.wav-6ef2d3317a82c347b715936ede79653a.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://ecva70pect61"
|
||||
path="res://.godot/imported/220178__gameaudio__click.wav-ca46bf33c1c48e1e526f04c43ca7d450.sample"
|
||||
path="res://.godot/imported/220178__gameaudio__click.wav-566ebf31c82573e187ff8a1db97a7861.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220178__gameaudio__click.wav"
|
||||
dest_files=["res://.godot/imported/220178__gameaudio__click.wav-ca46bf33c1c48e1e526f04c43ca7d450.sample"]
|
||||
source_file="res://sounds/220178__gameaudio__click.wav"
|
||||
dest_files=["res://.godot/imported/220178__gameaudio__click.wav-566ebf31c82573e187ff8a1db97a7861.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://b3wxawyrvuc6s"
|
||||
path="res://.godot/imported/220179__gameaudio__click-metal-ting.wav-b01c457287fe42298a36c3de7c536c68.sample"
|
||||
path="res://.godot/imported/220179__gameaudio__click-metal-ting.wav-82be282871110eef8fea8249619832d7.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220179__gameaudio__click-metal-ting.wav"
|
||||
dest_files=["res://.godot/imported/220179__gameaudio__click-metal-ting.wav-b01c457287fe42298a36c3de7c536c68.sample"]
|
||||
source_file="res://sounds/220179__gameaudio__click-metal-ting.wav"
|
||||
dest_files=["res://.godot/imported/220179__gameaudio__click-metal-ting.wav-82be282871110eef8fea8249619832d7.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://b7sr2sb1ks5en"
|
||||
path="res://.godot/imported/220180__gameaudio__click-pop.wav-9e467150046193d705dd830885c89cd1.sample"
|
||||
path="res://.godot/imported/220180__gameaudio__click-pop.wav-32216325683d314fa3adc66d13e633f4.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220180__gameaudio__click-pop.wav"
|
||||
dest_files=["res://.godot/imported/220180__gameaudio__click-pop.wav-9e467150046193d705dd830885c89cd1.sample"]
|
||||
source_file="res://sounds/220180__gameaudio__click-pop.wav"
|
||||
dest_files=["res://.godot/imported/220180__gameaudio__click-pop.wav-32216325683d314fa3adc66d13e633f4.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://1ccsqbju32ey"
|
||||
path="res://.godot/imported/220187__gameaudio__loosedeny-casual-1.wav-cb0e560d42c6026ded2d2e240e614433.sample"
|
||||
path="res://.godot/imported/220187__gameaudio__loosedeny-casual-1.wav-2e7c1356ffec0a1e5b732b21f42e21a0.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220187__gameaudio__loosedeny-casual-1.wav"
|
||||
dest_files=["res://.godot/imported/220187__gameaudio__loosedeny-casual-1.wav-cb0e560d42c6026ded2d2e240e614433.sample"]
|
||||
source_file="res://sounds/220187__gameaudio__loosedeny-casual-1.wav"
|
||||
dest_files=["res://.godot/imported/220187__gameaudio__loosedeny-casual-1.wav-2e7c1356ffec0a1e5b732b21f42e21a0.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bdnsgt7xt3261"
|
||||
path="res://.godot/imported/220194__gameaudio__click-heavy.wav-aca40ed286d93eb365d527a162fd3129.sample"
|
||||
path="res://.godot/imported/220194__gameaudio__click-heavy.wav-43269bff3c60e2451b470f929c6b6bb8.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220194__gameaudio__click-heavy.wav"
|
||||
dest_files=["res://.godot/imported/220194__gameaudio__click-heavy.wav-aca40ed286d93eb365d527a162fd3129.sample"]
|
||||
source_file="res://sounds/220194__gameaudio__click-heavy.wav"
|
||||
dest_files=["res://.godot/imported/220194__gameaudio__click-heavy.wav-43269bff3c60e2451b470f929c6b6bb8.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://daiv8ubwdbidf"
|
||||
path="res://.godot/imported/220195__gameaudio__click-wooden-1.wav-9368ef861eabf2cf1d5bd0db33c616c8.sample"
|
||||
path="res://.godot/imported/220195__gameaudio__click-wooden-1.wav-f161e2c5a53d686c65d143b45f33acb1.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220195__gameaudio__click-wooden-1.wav"
|
||||
dest_files=["res://.godot/imported/220195__gameaudio__click-wooden-1.wav-9368ef861eabf2cf1d5bd0db33c616c8.sample"]
|
||||
source_file="res://sounds/220195__gameaudio__click-wooden-1.wav"
|
||||
dest_files=["res://.godot/imported/220195__gameaudio__click-wooden-1.wav-f161e2c5a53d686c65d143b45f33acb1.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://qed775b4j1gg"
|
||||
path="res://.godot/imported/220196__gameaudio__click-wooden-2.wav-45bb63efefaf817b60155beec9343d74.sample"
|
||||
path="res://.godot/imported/220196__gameaudio__click-wooden-2.wav-372f3d1af9c561baf2360e14b5b7050b.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220196__gameaudio__click-wooden-2.wav"
|
||||
dest_files=["res://.godot/imported/220196__gameaudio__click-wooden-2.wav-45bb63efefaf817b60155beec9343d74.sample"]
|
||||
source_file="res://sounds/220196__gameaudio__click-wooden-2.wav"
|
||||
dest_files=["res://.godot/imported/220196__gameaudio__click-wooden-2.wav-372f3d1af9c561baf2360e14b5b7050b.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://bqtk1adk8umbx"
|
||||
path="res://.godot/imported/220197__gameaudio__click-basic.wav-9f173e2b7206278e95710ab077d62c32.sample"
|
||||
path="res://.godot/imported/220197__gameaudio__click-basic.wav-61aa24994882b9ab5848ecead3d7aba9.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220197__gameaudio__click-basic.wav"
|
||||
dest_files=["res://.godot/imported/220197__gameaudio__click-basic.wav-9f173e2b7206278e95710ab077d62c32.sample"]
|
||||
source_file="res://sounds/220197__gameaudio__click-basic.wav"
|
||||
dest_files=["res://.godot/imported/220197__gameaudio__click-basic.wav-61aa24994882b9ab5848ecead3d7aba9.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://ysgfx76jkx2q"
|
||||
path="res://.godot/imported/220198__gameaudio__click-with-two-parts.wav-089977567529b37b0fd9cd019eb7b3c2.sample"
|
||||
path="res://.godot/imported/220198__gameaudio__click-with-two-parts.wav-23adbbdcc4d995994bf9700f6b6e244d.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220198__gameaudio__click-with-two-parts.wav"
|
||||
dest_files=["res://.godot/imported/220198__gameaudio__click-with-two-parts.wav-089977567529b37b0fd9cd019eb7b3c2.sample"]
|
||||
source_file="res://sounds/220198__gameaudio__click-with-two-parts.wav"
|
||||
dest_files=["res://.godot/imported/220198__gameaudio__click-with-two-parts.wav-23adbbdcc4d995994bf9700f6b6e244d.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dtyh22ccebiv5"
|
||||
path="res://.godot/imported/220199__gameaudio__click-higher.wav-d1c1550d99a0cc873012c4010877005b.sample"
|
||||
path="res://.godot/imported/220199__gameaudio__click-higher.wav-0ea6f7a1d32e528aace111f0ce8b9631.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220199__gameaudio__click-higher.wav"
|
||||
dest_files=["res://.godot/imported/220199__gameaudio__click-higher.wav-d1c1550d99a0cc873012c4010877005b.sample"]
|
||||
source_file="res://sounds/220199__gameaudio__click-higher.wav"
|
||||
dest_files=["res://.godot/imported/220199__gameaudio__click-higher.wav-0ea6f7a1d32e528aace111f0ce8b9631.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://cywjbbeintjew"
|
||||
path="res://.godot/imported/220208__gameaudio__click-pop-two-part.wav-04cb5eb3e0b3459771dbab42bbd24be9.sample"
|
||||
path="res://.godot/imported/220208__gameaudio__click-pop-two-part.wav-9e40de3d9bebd124d0fe54a4f4cc4db9.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220208__gameaudio__click-pop-two-part.wav"
|
||||
dest_files=["res://.godot/imported/220208__gameaudio__click-pop-two-part.wav-04cb5eb3e0b3459771dbab42bbd24be9.sample"]
|
||||
source_file="res://sounds/220208__gameaudio__click-pop-two-part.wav"
|
||||
dest_files=["res://.godot/imported/220208__gameaudio__click-pop-two-part.wav-9e40de3d9bebd124d0fe54a4f4cc4db9.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://claw3d2wnyr6a"
|
||||
path="res://.godot/imported/220212__gameaudio__ping-bing.wav-2a1049829e71a0034c7e8d18745663f1.sample"
|
||||
path="res://.godot/imported/220212__gameaudio__ping-bing.wav-04a5460471fa8fe82fe5d9bc5d946bb0.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/220212__gameaudio__ping-bing.wav"
|
||||
dest_files=["res://.godot/imported/220212__gameaudio__ping-bing.wav-2a1049829e71a0034c7e8d18745663f1.sample"]
|
||||
source_file="res://sounds/220212__gameaudio__ping-bing.wav"
|
||||
dest_files=["res://.godot/imported/220212__gameaudio__ping-bing.wav-04a5460471fa8fe82fe5d9bc5d946bb0.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://clkjwcawdqvta"
|
||||
path="res://.godot/imported/money.mp3-95c717b8402507d80974f4f4287b0b63.mp3str"
|
||||
path="res://.godot/imported/money.mp3-e3eae11b0c1923c268268b900bde9157.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sounds/money.mp3"
|
||||
dest_files=["res://.godot/imported/money.mp3-95c717b8402507d80974f4f4287b0b63.mp3str"]
|
||||
source_file="res://sounds/money.mp3"
|
||||
dest_files=["res://.godot/imported/money.mp3-e3eae11b0c1923c268268b900bde9157.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
+77
-57
@@ -4,9 +4,10 @@ extends StaticBody3D
|
||||
const GAME_MANAGER = preload("res://GameManager.gd")
|
||||
|
||||
@export var thinking_duration: float = 3.0
|
||||
@export var primary_duration: float = 60.0
|
||||
@export var ordering_duration: float = 40.0
|
||||
@export var primary_duration: float = 40.0
|
||||
@export var friend_duration: float = 10.0
|
||||
@export var eating_duration: float = 4.0
|
||||
@export var eating_duration: float = 5.0
|
||||
@export var money_sound: AudioStream
|
||||
|
||||
@onready var label_3d: Label3D = $Label3D
|
||||
@@ -14,8 +15,11 @@ const GAME_MANAGER = preload("res://GameManager.gd")
|
||||
@onready var snap_zones: Array[XRToolsSnapZone] = []
|
||||
@onready var progress_bar: ProgressBar3D = $ProgressBar3D
|
||||
@onready var audio_player: AudioStreamPlayer3D = $AudioStreamPlayer3D
|
||||
@onready var customers: Node3D = $Customers
|
||||
@onready var player_detect_area_3d: Area3D = $PlayerDetectArea3D
|
||||
|
||||
const lbl_thinking: String = "Thinking"
|
||||
const lbl_thinking: String = "..."
|
||||
const lbl_ordering: String = "!"
|
||||
const lbl_gameover: String = "Game Over!"
|
||||
const lbl_eating: String = "Eating..."
|
||||
|
||||
@@ -24,6 +28,7 @@ const lbl_eating: String = "Eating..."
|
||||
enum TableState {
|
||||
EMPTY, # Just finished eating or havent eaten yet
|
||||
THINKING,
|
||||
ORDERING, # Wating for player to take their order
|
||||
WAITING_PRIMARY, # Inital wait to be served
|
||||
WAITING_FRIEND, # Waiting for friends food to arrive
|
||||
EATING
|
||||
@@ -35,10 +40,10 @@ enum TableState {
|
||||
## NetworkManager._gate_station). The setters below just refresh the display,
|
||||
## so both the server (via _setState) and clients (via incoming sync) show
|
||||
## the same text. Use _setState(), never assign _state directly.
|
||||
var _state: TableState = TableState.EMPTY: set = _set_state
|
||||
var _state_time: float = 0.0: set = _set_state_time
|
||||
var _state: TableState = TableState.EMPTY
|
||||
var _state_time: float = 0.0
|
||||
var _state_duration: float = 0.0 # set in _set_state_time
|
||||
var _unsatisfied_orders: Array[String] = []: set = _set_unsatisfied_orders
|
||||
var _unsatisfied_orders: Array[String] = []
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -49,6 +54,7 @@ func _ready() -> void:
|
||||
if not progress_bar or progress_bar is not ProgressBar3D:
|
||||
push_error("Table missing reference to progressbar, or wrong type:", progress_bar)
|
||||
progress_bar.y_billboard = true
|
||||
progress_bar.exponential = true
|
||||
# Render whatever state already arrived from the server before we were in
|
||||
# the tree (see the guard in _refresh_display).
|
||||
_refresh_display.call_deferred()
|
||||
@@ -68,6 +74,7 @@ func _ready() -> void:
|
||||
for snap_zone_node in snap_zones:
|
||||
snap_zone_node.has_picked_up.connect(_on_object_picked_up)
|
||||
snap_zone_node.has_dropped.connect(_on_object_dropped)
|
||||
player_detect_area_3d.body_entered.connect(_on_player_detected)
|
||||
set_process(true)
|
||||
_setState(TableState.EMPTY)
|
||||
|
||||
@@ -83,24 +90,38 @@ func _on_object_dropped() -> void:
|
||||
print("Table: object dropped ")
|
||||
|
||||
|
||||
func _on_player_detected(player):
|
||||
print("Table _on_player_detected(), ", player)
|
||||
if _state != TableState.ORDERING:
|
||||
return
|
||||
|
||||
place_order()
|
||||
_setState(TableState.WAITING_PRIMARY)
|
||||
|
||||
|
||||
func _get_plate_from_item(_item: Node) -> PlateController:
|
||||
return _item.get_children().filter(func(c): return c is PlateController).front() as PlateController
|
||||
|
||||
|
||||
func _absorb_item_if_correct(_item: Node) -> void:
|
||||
if not _item:
|
||||
return
|
||||
|
||||
# Get plate controller in childer of _item (hopefully a plate XRpickable)
|
||||
var plate = _get_plate_from_item(_item)
|
||||
if not plate:
|
||||
var plate_controller = _get_plate_from_item(_item)
|
||||
if not plate_controller:
|
||||
print("Table: held object is not a Plate")
|
||||
return
|
||||
print("Table: held a Plate!")
|
||||
#print("Table: held a Plate!")
|
||||
|
||||
# Absorm items from the plate we want
|
||||
for food_item in plate.container.contained_items:
|
||||
print("Table: held a plate with FoodItem: ", food_item.id)
|
||||
for food_item in plate_controller.container.contained_items:
|
||||
#print("Table: held a plate with FoodItem: ", food_item.id)
|
||||
if food_item.id in _unsatisfied_orders:
|
||||
print("Table: held FoodItem is in unsatisfied orders, removing it")
|
||||
print("Table: held a plate with FoodItem that is in unsatisfied orders, removing it")
|
||||
_unsatisfied_orders.erase(food_item.id)
|
||||
(plate_controller.get_parent() as XRToolsPickable).get_picked_up_by().enabled = false # Lock meal that is deliverd
|
||||
|
||||
if _unsatisfied_orders.size() > 0 and _state != TableState.EATING:
|
||||
_setState(TableState.WAITING_FRIEND)
|
||||
|
||||
@@ -112,12 +133,13 @@ func _absorb_item_if_correct(_item: Node) -> void:
|
||||
_setState(TableState.EATING)
|
||||
|
||||
|
||||
|
||||
func place_order() -> void:
|
||||
print("Table: place_order()")
|
||||
var new_orders = _unsatisfied_orders.duplicate()
|
||||
new_orders.append(GAME_MANAGER.get_random_meal())
|
||||
new_orders.append(GAME_MANAGER.get_random_meal())
|
||||
_set_unsatisfied_orders(new_orders)
|
||||
_unsatisfied_orders = new_orders
|
||||
|
||||
|
||||
func satisfyAllOrders() -> void:
|
||||
@@ -148,29 +170,62 @@ func _set_snap_zones_enabled(value: bool) -> void:
|
||||
## Server-only state transition: sets the new state's timer and assigns
|
||||
## _state (whose setter refreshes the display on every peer).
|
||||
func _setState(newState: TableState) -> void:
|
||||
print("Table set _state: ", TableState.keys()[newState])
|
||||
print("Table State START: ", TableState.keys()[newState])
|
||||
|
||||
match newState:
|
||||
TableState.EMPTY:
|
||||
_state_time = 5.0
|
||||
_state_duration = 5.0
|
||||
customers.visible = false
|
||||
_state = newState
|
||||
TableState.THINKING:
|
||||
_state_time = thinking_duration
|
||||
_state_duration = thinking_duration # Can't be done in _set_state(), will set duration inside timer
|
||||
_state = newState
|
||||
TableState.ORDERING:
|
||||
_state_time = ordering_duration
|
||||
_state_duration = ordering_duration
|
||||
_state = newState
|
||||
TableState.WAITING_PRIMARY:
|
||||
_state_time = primary_duration
|
||||
_state_duration = primary_duration
|
||||
_state = newState
|
||||
# Absorm meals that were already in the table when the state starts
|
||||
for zone in snap_zones:
|
||||
_absorb_item_if_correct(zone.picked_up_object)
|
||||
TableState.WAITING_FRIEND:
|
||||
_state_time = friend_duration
|
||||
_state_duration = friend_duration
|
||||
_state = newState
|
||||
TableState.EATING:
|
||||
_state_time = eating_duration
|
||||
_state_duration = eating_duration
|
||||
_set_snap_zones_enabled(false)
|
||||
|
||||
_state = newState
|
||||
|
||||
|
||||
|
||||
# When state timer is finished, do this stuff before moving to next state
|
||||
func _state_end(oldState: TableState):
|
||||
print("Table State END : ", TableState.keys()[oldState])
|
||||
match oldState:
|
||||
TableState.EMPTY:
|
||||
customers.visible = true
|
||||
_setState(TableState.THINKING)
|
||||
|
||||
TableState.THINKING:
|
||||
_setState(TableState.ORDERING)
|
||||
|
||||
TableState.EATING:
|
||||
clearAllPlates()
|
||||
_set_snap_zones_enabled(true)
|
||||
_setState(TableState.EMPTY)
|
||||
|
||||
TableState.ORDERING, TableState.WAITING_PRIMARY, TableState.WAITING_FRIEND:
|
||||
label_3d.text = lbl_gameover
|
||||
GAME_MANAGER.game_over()
|
||||
|
||||
|
||||
## Pure presentation, driven off the current (locally authoritative or
|
||||
## synced-from-server) state. Runs on every peer.
|
||||
func _refresh_display() -> void:
|
||||
@@ -180,6 +235,7 @@ func _refresh_display() -> void:
|
||||
# null. Bail out until _ready() has resolved them; _ready() calls back in
|
||||
# once it has, so nothing that arrived early is lost.
|
||||
if not progress_bar or not label_3d or not label_3d_time:
|
||||
push_error("Table missing progress bar or label")
|
||||
return
|
||||
match _state:
|
||||
TableState.EMPTY:
|
||||
@@ -188,6 +244,10 @@ func _refresh_display() -> void:
|
||||
TableState.THINKING:
|
||||
progress_bar.set_bar_visible(false)
|
||||
label_3d.text = lbl_thinking
|
||||
TableState.ORDERING:
|
||||
progress_bar.set_bar_visible(true)
|
||||
progress_bar.override_fill_color(Color.RED if _state_time < 10 else Color.YELLOW)
|
||||
label_3d.text = lbl_ordering
|
||||
TableState.WAITING_PRIMARY:
|
||||
label_3d.text = "%s\n%s" % [TableState.keys()[_state], "\n".join(_unsatisfied_orders)]
|
||||
progress_bar.set_bar_visible(true)
|
||||
@@ -204,53 +264,13 @@ func _refresh_display() -> void:
|
||||
progress_bar.set_progress(clampf(float(_state_time) / _state_duration, 0.0, 1.0))
|
||||
|
||||
|
||||
func _set_state(value: TableState) -> void:
|
||||
_state = value
|
||||
_refresh_display()
|
||||
|
||||
|
||||
func _set_state_time(value: float) -> void:
|
||||
_state_time = value
|
||||
_refresh_display()
|
||||
|
||||
|
||||
func _set_unsatisfied_orders(value: Array[String]) -> void:
|
||||
_unsatisfied_orders = value
|
||||
_refresh_display()
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
_refresh_display()
|
||||
# Wait for state to finish
|
||||
if _state_time > 0.0:
|
||||
_state_time = max(0.0, _state_time - delta)
|
||||
return
|
||||
|
||||
if GAME_MANAGER.game_state == GAME_MANAGER.GameState.GAME_OVER:
|
||||
return
|
||||
|
||||
# When state timer is finished, do this stuff before moving to next state
|
||||
match _state:
|
||||
TableState.EMPTY:
|
||||
print("Table State EMPTY finish")
|
||||
_setState(TableState.THINKING)
|
||||
|
||||
TableState.THINKING:
|
||||
print("Table State THINKING finish")
|
||||
place_order()
|
||||
_setState(TableState.WAITING_PRIMARY)
|
||||
|
||||
TableState.WAITING_PRIMARY:
|
||||
print("Table State WAITING_PRIMARY finish")
|
||||
label_3d.text = lbl_gameover
|
||||
GAME_MANAGER.game_over()
|
||||
|
||||
TableState.WAITING_FRIEND:
|
||||
print("Table State WAITING_FRIEND finish")
|
||||
label_3d.text = lbl_gameover
|
||||
GAME_MANAGER.game_over()
|
||||
|
||||
TableState.EATING:
|
||||
print("Table State EATING finish")
|
||||
clearAllPlates()
|
||||
_set_snap_zones_enabled(true)
|
||||
_setState(TableState.EMPTY)
|
||||
_state_end(_state)
|
||||
|
||||
+13
-4
@@ -1,10 +1,10 @@
|
||||
[gd_scene format=3 uid="uid://caf0xanmxbshy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://caeikc7e3igkd" path="res://Stations/table.gd" id="1_2vcpj"]
|
||||
[ext_resource type="Script" uid="uid://caeikc7e3igkd" path="res://stations/table.gd" id="1_2vcpj"]
|
||||
[ext_resource type="Script" uid="uid://cquqe4f1m1sw6" path="res://addons/godot-xr-tools/objects/snap_zone.gd" id="1_8j1nt"]
|
||||
[ext_resource type="AudioStream" uid="uid://clkjwcawdqvta" path="res://Sounds/money.mp3" id="2_jslhm"]
|
||||
[ext_resource type="AudioStream" uid="uid://daiv8ubwdbidf" path="res://Sounds/220195__gameaudio__click-wooden-1.wav" id="3_0s6ir"]
|
||||
[ext_resource type="PackedScene" uid="uid://bxbocxdaayvwx" path="res://UI/progress_bar.tscn" id="3_kjf1i"]
|
||||
[ext_resource type="AudioStream" uid="uid://clkjwcawdqvta" path="res://sounds/money.mp3" id="2_jslhm"]
|
||||
[ext_resource type="AudioStream" uid="uid://daiv8ubwdbidf" path="res://sounds/220195__gameaudio__click-wooden-1.wav" id="3_0s6ir"]
|
||||
[ext_resource type="PackedScene" uid="uid://bxbocxdaayvwx" path="res://ui/progress_bar.tscn" id="3_kjf1i"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_24d3s"]
|
||||
size = Vector3(0.6, 1, 0.6)
|
||||
@@ -26,6 +26,9 @@ properties/2/path = NodePath(".:_unsatisfied_orders")
|
||||
properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_vlqg6"]
|
||||
size = Vector3(2.1, 0.5, 2.1)
|
||||
|
||||
[node name="Table" type="StaticBody3D" unique_id=1863572470 groups=["station"]]
|
||||
script = ExtResource("1_2vcpj")
|
||||
money_sound = ExtResource("2_jslhm")
|
||||
@@ -198,3 +201,9 @@ y_billboard = true
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="." unique_id=724610642]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2935008, 0)
|
||||
|
||||
[node name="PlayerDetectArea3D" type="Area3D" parent="." unique_id=913445150]
|
||||
collision_mask = 524288
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="PlayerDetectArea3D" unique_id=1538221021]
|
||||
shape = SubResource("BoxShape3D_vlqg6")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cexxfyw03hr81"
|
||||
path.s3tc="res://.godot/imported/1.png-1282cd758f0d245fa29065df8c6fe28d.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/1.png-28d6e3d31e46c95f0dea1abf906c0f74.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
@@ -11,8 +11,8 @@ metadata={
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/1.png"
|
||||
dest_files=["res://.godot/imported/1.png-1282cd758f0d245fa29065df8c6fe28d.s3tc.ctex"]
|
||||
source_file="res://textures/1.png"
|
||||
dest_files=["res://.godot/imported/1.png-28d6e3d31e46c95f0dea1abf906c0f74.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxsy4fi0iv1dx"
|
||||
path.s3tc="res://.godot/imported/2.png-58b544529b3c8efe890c8b21f147e810.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/2.png-3b4d648e04c4a84e8b8f6c622069553c.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
@@ -11,8 +11,8 @@ metadata={
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/2.png"
|
||||
dest_files=["res://.godot/imported/2.png-58b544529b3c8efe890c8b21f147e810.s3tc.ctex"]
|
||||
source_file="res://textures/2.png"
|
||||
dest_files=["res://.godot/imported/2.png-3b4d648e04c4a84e8b8f6c622069553c.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxeeadx0c2ygg"
|
||||
path.s3tc="res://.godot/imported/3.png-ea971c9bd22bfef88dcd66b7417b5707.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/3.png-ff3babb0d8b4fdc49e4a4961a679d180.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
@@ -11,8 +11,8 @@ metadata={
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/3.png"
|
||||
dest_files=["res://.godot/imported/3.png-ea971c9bd22bfef88dcd66b7417b5707.s3tc.ctex"]
|
||||
source_file="res://textures/3.png"
|
||||
dest_files=["res://.godot/imported/3.png-ff3babb0d8b4fdc49e4a4961a679d180.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://xpf60mxi3cf"
|
||||
path.s3tc="res://.godot/imported/4.png-352134ccf44954619410b58ec193bd16.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/4.png-7c86e7f37dd6d943dc49fdd7899e8cb6.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
@@ -11,8 +11,8 @@ metadata={
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/4.png"
|
||||
dest_files=["res://.godot/imported/4.png-352134ccf44954619410b58ec193bd16.s3tc.ctex"]
|
||||
source_file="res://textures/4.png"
|
||||
dest_files=["res://.godot/imported/4.png-7c86e7f37dd6d943dc49fdd7899e8cb6.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b7n8d4krwbcvl"
|
||||
path.s3tc="res://.godot/imported/5.png-be0d39347a68c1d063c92edeb31b0a20.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/5.png-b386ff019a5e522d985ab44e8f6c88d9.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
@@ -11,8 +11,8 @@ metadata={
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/5.png"
|
||||
dest_files=["res://.godot/imported/5.png-be0d39347a68c1d063c92edeb31b0a20.s3tc.ctex"]
|
||||
source_file="res://textures/5.png"
|
||||
dest_files=["res://.godot/imported/5.png-b386ff019a5e522d985ab44e8f6c88d9.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://eqp04wybmg"
|
||||
path="res://.godot/imported/devTex.svg-7096dfe1fce7d6bfeb43d4ba1bd108ed.ctex"
|
||||
path="res://.godot/imported/devTex.svg-246e77b8f216572aac74f8f3d27707b4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/devTex.svg"
|
||||
dest_files=["res://.godot/imported/devTex.svg-7096dfe1fce7d6bfeb43d4ba1bd108ed.ctex"]
|
||||
source_file="res://textures/devTex.svg"
|
||||
dest_files=["res://.godot/imported/devTex.svg-246e77b8f216572aac74f8f3d27707b4.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cmia50cfqxxo4"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://eqp04wybmg" path="res://Textures/devTex.svg" id="1_3jxsn"]
|
||||
[ext_resource type="Texture2D" uid="uid://eqp04wybmg" path="res://textures/devTex.svg" id="1_3jxsn"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_0gbf8"]
|
||||
transparency = 1
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://hfkxs3ncjc4m"
|
||||
path="res://.godot/imported/NightSkyHDRI009.png-5fecb5274d03e5767c649d4bae381a39.ctex"
|
||||
path="res://.godot/imported/NightSkyHDRI009.png-30c624de99c676c23642a0e7a463453d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/sky/NightSkyHDRI009.png"
|
||||
dest_files=["res://.godot/imported/NightSkyHDRI009.png-5fecb5274d03e5767c649d4bae381a39.ctex"]
|
||||
source_file="res://textures/sky/NightSkyHDRI009.png"
|
||||
dest_files=["res://.godot/imported/NightSkyHDRI009.png-30c624de99c676c23642a0e7a463453d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="Sky" format=3 uid="uid://c1abtpwhdm2d5"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ci0hjoabnf8nu" path="res://Textures/sky/NightSkyHDRI009_16K_HDR.exr" id="acg_mft3ic9d"]
|
||||
[ext_resource type="Texture2D" uid="uid://ci0hjoabnf8nu" path="res://textures/sky/NightSkyHDRI009_16K_HDR.exr" id="acg_mft3ic9d"]
|
||||
|
||||
[sub_resource type="PanoramaSkyMaterial" id="acg_025sfqr4"]
|
||||
panorama = ExtResource("acg_mft3ic9d")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ci0hjoabnf8nu"
|
||||
path.bptc="res://.godot/imported/NightSkyHDRI009_16K_HDR.exr-9a5d77664863ac9d0a6a2889b31099ca.bptc.ctex"
|
||||
path.bptc="res://.godot/imported/NightSkyHDRI009_16K_HDR.exr-43fd92962b13d105254e11ecfdaf0858.bptc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
@@ -11,8 +11,8 @@ metadata={
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/sky/NightSkyHDRI009_16K_HDR.exr"
|
||||
dest_files=["res://.godot/imported/NightSkyHDRI009_16K_HDR.exr-9a5d77664863ac9d0a6a2889b31099ca.bptc.ctex"]
|
||||
source_file="res://textures/sky/NightSkyHDRI009_16K_HDR.exr"
|
||||
dest_files=["res://.godot/imported/NightSkyHDRI009_16K_HDR.exr-43fd92962b13d105254e11ecfdaf0858.bptc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c64om8q11trnm"
|
||||
path="res://.godot/imported/NightSkyHDRI009_16K_TONEMAPPED.jpg-8d036fe183f31a1e4946600f7e0a089a.ctex"
|
||||
path="res://.godot/imported/NightSkyHDRI009_16K_TONEMAPPED.jpg-772032c9d36bbd100929d978b6fbe78b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/sky/NightSkyHDRI009_16K_TONEMAPPED.jpg"
|
||||
dest_files=["res://.godot/imported/NightSkyHDRI009_16K_TONEMAPPED.jpg-8d036fe183f31a1e4946600f7e0a089a.ctex"]
|
||||
source_file="res://textures/sky/NightSkyHDRI009_16K_TONEMAPPED.jpg"
|
||||
dest_files=["res://.godot/imported/NightSkyHDRI009_16K_TONEMAPPED.jpg-772032c9d36bbd100929d978b6fbe78b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ extends Node3D
|
||||
class_name ProgressBar3D
|
||||
|
||||
@export var y_billboard: bool = false
|
||||
@export var exponential:bool = false
|
||||
|
||||
@onready var progress_bar: ProgressBar = $Sprite3D/SubViewport/ProgressBar
|
||||
@onready var sprite_3d: Sprite3D = $Sprite3D
|
||||
@@ -14,6 +15,9 @@ func _ready() -> void:
|
||||
$Sprite3D.billboard = BaseMaterial3D.BillboardMode.BILLBOARD_FIXED_Y
|
||||
|
||||
func set_progress(value: float) -> void:
|
||||
if exponential:
|
||||
progress_bar.value = clamp(pow(value, 2.1), 0.0, 1.0) * 100
|
||||
else:
|
||||
progress_bar.value = clamp(value, 0.0, 1.0) * 100
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user