feat: finished rifle ammo pickup
This commit is contained in:
parent
1b1eca2e6a
commit
fb1e707039
1 changed files with 7 additions and 2 deletions
|
|
@ -8,8 +8,13 @@
|
|||
resource_name = "RifleAmmoPickup"
|
||||
script/source = "extends Interactable
|
||||
|
||||
func _highlight_changed(interactor: PlayerInteractor, value: bool) -> void:
|
||||
var hud := HeadsUpDisplay.get_singleton()
|
||||
if hud:
|
||||
hud.set_tooltip(\"Pick up 10 shots of rifle ammo\" if value else \"\")
|
||||
|
||||
func _activated(interactor: PlayerInteractor) -> void:
|
||||
interactor.get_inventory().pistol_ammo += 10
|
||||
interactor.get_inventory().rifle_ammo += 10
|
||||
get_parent().queue_free()
|
||||
|
||||
func _process(delta : float):
|
||||
|
|
@ -27,5 +32,5 @@ 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")]
|
||||
[node name="rifle_ammo_pickup" parent="." unique_id=949497395 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