Untested PickupableItem
This commit is contained in:
parent
a2c062e8bb
commit
63e87e86d5
19 changed files with 200 additions and 17 deletions
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://ddjjrkernsobh"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://ddjjrkernsobh"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bdgoa18kfhlwo" path="res://base/assets/sprites/interactive/interactive.png" id="1_yf10f"]
|
||||
[ext_resource type="Script" uid="uid://fva8kqc3mk86" path="res://base/scripts/interactive_object.gd" id="2_cdwk3"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_cdwk3"]
|
||||
|
||||
|
@ -9,8 +10,12 @@ pixel_size = 0.0313
|
|||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_yf10f")
|
||||
script = ExtResource("2_cdwk3")
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||
shape = SubResource("SphereShape3D_cdwk3")
|
||||
|
||||
[connection signal="body_entered" from="Area3D" to="." method="_on_body_entered"]
|
||||
[connection signal="body_exited" from="Area3D" to="." method="_on_body_exited"]
|
||||
|
|
21
base/scenes/interactive/pickupable_item.tscn
Normal file
21
base/scenes/interactive/pickupable_item.tscn
Normal file
|
@ -0,0 +1,21 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://c4wpq5gxkbor7"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bdgoa18kfhlwo" path="res://base/assets/sprites/interactive/interactive.png" id="1_2373a"]
|
||||
[ext_resource type="Script" uid="uid://v2v4keo0ydlc" path="res://base/scripts/interactive/pickupable_item.gd" id="2_2373a"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_cdwk3"]
|
||||
|
||||
[node name="PickupableItem" type="Sprite3D"]
|
||||
pixel_size = 0.0313
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_2373a")
|
||||
script = ExtResource("2_2373a")
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||
shape = SubResource("SphereShape3D_cdwk3")
|
||||
|
||||
[connection signal="body_entered" from="Area3D" to="." method="_on_body_entered"]
|
||||
[connection signal="body_exited" from="Area3D" to="." method="_on_body_exited"]
|
|
@ -9,6 +9,21 @@
|
|||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jjqxs"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gt0rj"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("HUD/Weapon:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_8sdfx"]
|
||||
resource_name = "default"
|
||||
length = 1.33334
|
||||
|
@ -27,21 +42,6 @@ tracks/0/keys = {
|
|||
"values": [Vector2(0, 0), Vector2(16, 32), Vector2(0, 0), Vector2(32, 32), Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_gt0rj"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("HUD/Weapon:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(0, 0)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_juj2l"]
|
||||
resource_name = "static"
|
||||
step = 0.0
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
[gd_scene format=3 uid="uid://bgnb01j1nphhi"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bgnb01j1nphhi"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c4wpq5gxkbor7" path="res://base/scenes/interactive/pickupable_item.tscn" id="1_1whpt"]
|
||||
[ext_resource type="Resource" uid="uid://b1pqbhcv5ixmy" path="res://base/assets/resources/items/weapon_base.tres" id="2_ayew2"]
|
||||
|
||||
[node name="Test Room" type="Node3D"]
|
||||
|
||||
|
@ -41,3 +44,11 @@ size = Vector3(0.2, 4, 4)
|
|||
[node name="SpotLight3D" type="SpotLight3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 2.6, 0)
|
||||
spot_angle = 90.0
|
||||
|
||||
[node name="PickupableItem" parent="." instance=ExtResource("1_1whpt")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.992068, -0.47008, -0.800458)
|
||||
content = ExtResource("2_ayew2")
|
||||
|
||||
[node name="PickupableItem2" parent="." instance=ExtResource("1_1whpt")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.700438, -0.47008, -0.800458)
|
||||
content = ExtResource("2_ayew2")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue