chore: created rifle ammo pickup
This commit is contained in:
parent
18c8154576
commit
a575aee294
3 changed files with 91 additions and 0 deletions
31
project/objects/pickups/rifle_ammo_pickup.tscn
Normal file
31
project/objects/pickups/rifle_ammo_pickup.tscn
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
[gd_scene format=3 uid="uid://c4ocislhm428e"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://hmnpg2lm6u02" path="res://assets/models/pickups/rifle_ammo_pickup.blend" id="1_nigrf"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_txvix"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_nigrf"]
|
||||
resource_name = "RifleAmmoPickup"
|
||||
script/source = "extends Interactable
|
||||
|
||||
func _activated(interactor: PlayerInteractor) -> void:
|
||||
interactor.get_inventory().pistol_ammo += 10
|
||||
get_parent().queue_free()
|
||||
|
||||
func _process(delta : float):
|
||||
$\"../rifle_ammo_pickup\".global_rotate(Vector3(0, 1, 0), delta)
|
||||
"
|
||||
|
||||
[node name="RifleAmmoPickup" type="StaticBody3D" unique_id=384637127]
|
||||
collision_layer = 16
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=41210596]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.4182733, 0)
|
||||
shape = SubResource("SphereShape3D_txvix")
|
||||
|
||||
[node name="Interactable" type="Interactable" parent="." unique_id=1018953245]
|
||||
script = SubResource("GDScript_nigrf")
|
||||
|
||||
[node name="rifle_ammo_pickup" parent="." unique_id=775409181 instance=ExtResource("1_nigrf")]
|
||||
transform = Transform3D(0.9304751, -0.3154218, 0.1863468, 0.3663551, 0.80111384, -0.4732869, 0, 0.5086508, 0.8609729, 0, 1.3961476, 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue