using UnityEngine;
using System.Collections;

public class PentagramUpgrade : MonoBehaviour {

	public GameObject pentagramPrefab;
	public bool canPlacePentagram;

	// Use this for initialization
	void Start () {
		canPlacePentagram = true;
	}
	
	// Update is called once per frame
	void Update () {
		if(canPlacePentagram && Input.GetKeyDown(KeyCode.Alpha2))
		{
            
			GameObject newPentagram = (GameObject)Instantiate (pentagramPrefab, this.transform.position, Quaternion.Euler(0,0,0));
			newPentagram.transform.position = Camera.main.ScreenToWorldPoint (Input.mousePosition);
			newPentagram.transform.position = new Vector3 (newPentagram.transform.position.x, newPentagram.transform.position.y, 0);
			canPlacePentagram = false;
		}
	}
}
