feat: added interactions, demo packs and destructables
This commit is contained in:
parent
d66c999039
commit
5a4ac26c72
12 changed files with 369 additions and 23 deletions
27
project/objects/pickups/demo_pack_pickup.tscn
Normal file
27
project/objects/pickups/demo_pack_pickup.tscn
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cclghy01gblif"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_kl827"]
|
||||
radius = 0.1282442
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_kl827"]
|
||||
script/source = "extends Interactable
|
||||
|
||||
func _activated(interactor: PlayerInteractor) -> void:
|
||||
interactor.pickup_demo_pack()
|
||||
get_owner().queue_free()
|
||||
"
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_kl827"]
|
||||
size = Vector3(0.2, 0.1, 0.2)
|
||||
|
||||
[node name="DemoPackPickup" type="StaticBody3D"]
|
||||
collision_layer = 18
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_kl827")
|
||||
|
||||
[node name="Interactable" type="Interactable" parent="."]
|
||||
script = SubResource("GDScript_kl827")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
mesh = SubResource("BoxMesh_kl827")
|
||||
Loading…
Add table
Add a link
Reference in a new issue