using UnityEngine;
using System.Collections;

public class ParticlesController : MonoBehaviour {

	public ParticleSystem particleSuccess;
	public ParticleSystem particleFailure;
	public ParticleSystem lifeGain;

	public ParticleSystem happy;

	public Transform particlesParent;
	public Transform lifeGainPosition;

	public static ParticlesController instance;

	// Use this for initialization
	void Start () {
		instance = this;
	}

	public void DisplayHit(float percent)
	{
	}

	public void DisplayPerfect()
	{
	}

	public void DisplayMiss()
	{
	}

	public void PlayParticleSuccess(Vector2 position)
	{
		var result = Instantiate (particleSuccess) as ParticleSystem;
		result.transform.parent = particlesParent;
		result.transform.localScale = Vector3.one;
		result.transform.position = position;
	}

	public void PlayParticleFailure(Vector2 position)
	{
		var result = Instantiate (particleFailure) as ParticleSystem;
		result.transform.parent = particlesParent;
		result.transform.localScale = Vector3.one;
		result.transform.position = position;
	}

	public void PlayParticleLifeGain()
	{
		var result = Instantiate (lifeGain) as ParticleSystem;
		//result.transform.parent = particlesParent;
		//result.transform.localScale = Vector3.one;
		//result.transform.position = lifeGainPosition.position;
	}

	public void PlayParticleHappy()
	{
		var result = Instantiate (happy) as ParticleSystem;
	}
}
