using UnityEngine;
using System.Collections;

public class InstantiateManager : MonoBehaviour
{
	public GameObject[] gameObjects;
	
	public GameObject multiSpawn;

	public static InstantiateManager Instance {get; private set;}
	
	void Awake()
	{
		Instance = this;
	}

	public static void PlaceMultiSpawner(Vector3 pos)
	{
		Instantiate(Instance.multiSpawn, pos, Quaternion.identity);
	}
	
	public static void PlaceGameObject(Vector3 pos, Vector3 normal, Transform parent)
	{
		GameObject go = Instantiate(Instance.gameObjects[Random.Range(0, Instance.gameObjects.Length)], pos, Quaternion.Euler(normal)) as GameObject;
		go.transform.parent = parent;
	}
}

