using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Antena : MonoBehaviour {
//	public Material[] Colores;
//	Renderer material;
	public AudioSource AntenaUp;
	public AudioSource AntenaDown;
	public AudioSource[] AudioSources;
	public bool Encendida;

	Animator Anim;

	void Start () {
		Anim = GetComponent <Animator>();
		AudioSources = GetComponents<AudioSource> ();


		AntenaUp = AudioSources[0];
		AntenaDown = AudioSources[1];

		Encendida = false;
	//	material = GetComponent<Renderer> ();
	}
	
	public void ActivarAntena(){
		Anim.SetBool ("Activada",true);
		AntenaUp.Play ();
		Encendida = true;
	//	material.material = Colores [1];
	}

	public void DesactivarAntena(){
		Debug.Log ("hola"	);
		Anim.SetBool ("Activada",false);
		AntenaDown.Play ();
		Encendida = false;
		//material.material = Colores [0];
	}
		
}
