extends Node2D


# Declare member variables here. Examples:
# var a = 2
# var b = "text"


# Called when the node enters the scene tree for the first time.
func _ready():
	$switch.connect("activate",self,"activate")
	$Torret_circuit/switch/CollisionShape2D.disabled = true
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass
var active = false

func activate():
	$Torret_circuit/switch/CollisionShape2D.disabled = false
	$switch/cable.play("sano")
	$switch/icono.visible = false
	$AudioStreamPlayer.stop()
	active = true
	pass


func _on_AudioStreamPlayer_finished():
	if not active:
		$AudioStreamPlayer.play(0)
	pass # Replace with function body.
