Updated pickupable script
This commit is contained in:
+30
-1
@@ -10,6 +10,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cyn6cmirqiiya" path="res://Scenes/SpatialAudioPlayer.tscn" id="8_bmxlf"]
|
||||
[ext_resource type="AudioStream" uid="uid://dkc00xclmtkbo" path="res://Scenes/Buy Something!.mp3" id="8_vy5pj"]
|
||||
[ext_resource type="PackedScene" uid="uid://dknge5384ijcx" path="res://Scenes/SimpleKey.tscn" id="10_bmxlf"]
|
||||
[ext_resource type="Script" uid="uid://b143brnl7gf4f" path="res://Scripts/Pickupable.gd" id="11_4kpch"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_1blfk"]
|
||||
size = Vector3(50, 0.1, 50)
|
||||
@@ -21,6 +22,13 @@ size = Vector3(50, 0.1, 50)
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_fos0i"]
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_1blfk"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_va8t4"]
|
||||
albedo_color = Color(1, 0, 0, 1)
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_1blfk"]
|
||||
|
||||
[node name="Main" type="Node3D" unique_id=856459222]
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=268564877]
|
||||
@@ -117,7 +125,28 @@ maxRaycastDistance = 10.0
|
||||
|
||||
[node name="SimplePickupable4" parent="." unique_id=1419866814 instance=ExtResource("10_bmxlf")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0351448, 3.2192059)
|
||||
bodyMass = 5.0
|
||||
|
||||
[node name="SimplePickupable5" type="Node3D" parent="." unique_id=1116791131 node_paths=PackedStringArray("body")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.0500765, 1.2124488, 6.335041)
|
||||
script = ExtResource("11_4kpch")
|
||||
body = NodePath("")
|
||||
bodyMass = 100.0
|
||||
metadata/_custom_type_script = "uid://b143brnl7gf4f"
|
||||
|
||||
[node name="HeavyCube" type="RigidBody3D" parent="." unique_id=51671641 node_paths=PackedStringArray("body")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.310133, 6.0430264)
|
||||
collision_layer = 9
|
||||
collision_mask = 13
|
||||
script = ExtResource("11_4kpch")
|
||||
body = NodePath(".")
|
||||
bodyMass = 100.0
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="HeavyCube" unique_id=269584364]
|
||||
mesh = SubResource("SphereMesh_1blfk")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_va8t4")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="HeavyCube" unique_id=843818180]
|
||||
shape = SubResource("SphereShape3D_1blfk")
|
||||
|
||||
[connection signal="pressed" from="SimplePressButton" to="Block" method="toggleMove"]
|
||||
[connection signal="held" from="SimpleHoldButton" to="Block" method="holdMove"]
|
||||
|
||||
Reference in New Issue
Block a user