using UnityEngine;
using System.Collections;

public class respawnWolves : MonoBehaviour
{

	public Transform wolfPrefab;
	public int requiredWolf;

	public float horz;
	public float vert;
	public GameObject self;

	// Use this for initialization
	void Start ()
	{
		self = gameObject;
	}
	
	// Update is called once per frame
	void Update ()
	{



		if (((GameObject.FindGameObjectsWithTag ("Wolf").Length-1)/9+1)  < requiredWolf)
			Instantiate (wolfPrefab, new Vector3 (Random.Range (-horz, horz), -vert, transform.position.z), Quaternion.identity);
			

	}
}
