1
Fork 0
mirror of https://github.com/Steffo99/pineapple-surf.git synced 2024-11-21 15:34:17 +00:00

Move player reference to @onready variable

This commit is contained in:
Steffo 2023-01-09 00:35:59 +01:00
parent fc286266d7
commit 2be0b42c14
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -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