using UnityEngine;
using System.Collections;

public class ZombieManager : MonoBehaviour {

	public float defaultCoolDownZumbiKind0;
	public float defaultCoolDownZumbiKind1;
	public float defaultCoolDownZumbiKind2;

	
	public int countZombie0;
	public int countZombie1;
	public int countZombie2;
	
	public GameObject Zombie0;
	public GameObject Zombie1;
	public GameObject Zombie2;
	
	public GUIText GUIcountZombie1;
	public GUIText GUIcountZombie2;
	public GUIText GUIcountZombie3;




	// Use this for initialization
	void Start () {
		
		GUICountZombie.count= countZombie0;
		GUICountZombie.count= countZombie1;
		GUICountZombie.count= countZombie2;
        

		for (int i=0; i<countZombie0-1; i++) {
			Instantiate(Zombie0,Zombie0.transform.position,Quaternion.identity);	
		}
		for (int i=0; i<countZombie1-1; i++) {
			Instantiate(Zombie1,Zombie1.transform.position,Quaternion.identity);			
		}
		for (int i=0; i<countZombie2-1; i++) {
			Instantiate(Zombie2,Zombie2.transform.position,Quaternion.identity);
		}

	}
	
	// Update is called once per frame
	void Update () {

	}


	public void removeCountZombies(int kind){

		if(kind == 0){
			countZombie0--;
			GUICountZombie.count= countZombie0;
			//GUIcountZombie1.text = countZombie0+"" ;
			print("Tipo "+kind+" "+countZombie0+" "+countZombie0.ToString());
		}else if(kind == 1){
			countZombie1--;
			GUIcountZombie2.text = countZombie1+"" ;
			print("Tipo "+kind+" "+countZombie1);
		}else if(kind == 2){
			countZombie2--;
			GUIcountZombie3.text = countZombie2+"";
			print("Tipo "+kind+" "+countZombie2);
		}


	}



}
