forked from funnymemellama/funnymemellama
Make sure shit doesnt happen while invisible
This commit is contained in:
parent
941c661f6c
commit
970675c6d7
1 changed files with 5 additions and 0 deletions
5
Suit.gd
5
Suit.gd
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue