Make sure shit doesnt happen while invisible

This commit is contained in:
Thomas Muller 2023-10-02 18:16:03 -04:00
parent 941c661f6c
commit 970675c6d7

View file

@ -6,6 +6,8 @@ var _grab_sound: AudioStreamPlayer3D = $GrabSound
@onready
var _voice = $VoiceOverlay
var _activated = false
func _ready():
_grab_sound.finished.connect(_on_sound_finished)
@ -13,7 +15,10 @@ func _ready():
func _on_body_entered(body):
if _activated: return
if body.is_in_group('Players'):
_activated = true
hide()
_grab_sound.play()
_voice.play()