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
File diff suppressed because one or more lines are too long
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")
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://snjgu4yp5swd"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://snjgu4yp5swd"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ce40pq785yoyi" path="res://objects/weapons/rifle.tscn" id="1_eqqp1"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_eqqp1"]
|
||||
radius = 0.2
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_eqqp1"]
|
||||
script/source = "extends HealthStatus
|
||||
|
||||
|
|
@ -23,6 +26,12 @@ unique_name_in_owner = true
|
|||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.60811, 0)
|
||||
fov = 60.0
|
||||
|
||||
[node name="PlayerInteractor" type="PlayerInteractor" parent="PlayerCamera"]
|
||||
shape = SubResource("SphereShape3D_eqqp1")
|
||||
target_position = Vector3(0, 0, -2)
|
||||
collision_mask = 22
|
||||
collide_with_areas = true
|
||||
|
||||
[node name="PlayerInput" type="PlayerInput" parent="."]
|
||||
unique_name_in_owner = true
|
||||
process_mode = 3
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ activate={
|
|||
3d_physics/layer_2="Precision"
|
||||
3d_physics/layer_3="Hitbox(Enemy)"
|
||||
3d_physics/layer_4="Hitbox(Player)"
|
||||
3d_physics/layer_5="Interactables"
|
||||
|
||||
[physics]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue