mirror of
https://github.com/Steffo99/pineapple-surf.git
synced 2024-11-25 01:04:18 +00:00
Move player reference to @onready variable
This commit is contained in:
parent
fc286266d7
commit
2be0b42c14
1 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,9 @@ extends RigidBody3D
|
|||
|
||||
@export var value = 5
|
||||
|
||||
@onready var player := Singletons.player
|
||||
|
||||
|
||||
func _on_collectible_by_player_collected():
|
||||
var ps: PeaShooter = Singletons.player.get_node("Head/OnHand/PeaShooter")
|
||||
var ps: PeaShooter = player.get_node("Head/OnHand/PeaShooter")
|
||||
ps.remaining += value
|
||||
|
|
Loading…
Reference in a new issue