using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class PopUpDescription : MonoBehaviour {

	public enum RitualType
	{
		Sacrifice,
		Fertility,
		Divine,
		Fire,
		Rain
	}

	public RitualType ritualType = RitualType.Sacrifice;

	public Slider percentSlider;
	
	public Slider sliderBarDelta;

	// Use this for initialization
	void OnEnable () 
	{
		if (RitualManager.instance == null)
			return;

		//Debug.Log ("START POP UP ");
		if(ritualType == RitualType.Sacrifice)
		{
			sliderBarDelta.GetComponent<WowBarDelta>().SetDeltaValue(RitualManager.instance.sacrificeRitual.goodWow);
			percentSlider.value = RitualManager.instance.sacrificeRitual.probability;
		}
		else if(ritualType == RitualType.Fertility)
		{
			sliderBarDelta.GetComponent<WowBarDelta>().SetDeltaValue(RitualManager.instance.fertRitual.goodWow);
			percentSlider.value = RitualManager.instance.fertRitual.probability;
		}
		else if(ritualType == RitualType.Divine)
		{
			sliderBarDelta.GetComponent<WowBarDelta>().SetDeltaValue(RitualManager.instance.divineRitual.goodWow);
			percentSlider.value = RitualManager.instance.divineRitual.probability;
		}
		else if(ritualType == RitualType.Fire)
		{
			sliderBarDelta.GetComponent<WowBarDelta>().SetDeltaValue(RitualManager.instance.fireRitual.goodWow);
			percentSlider.value = RitualManager.instance.fireRitual.probability;
		}
		else if(ritualType == RitualType.Rain)
		{		
			sliderBarDelta.GetComponent<WowBarDelta>().SetDeltaValue(RitualManager.instance.rainRitual.goodWow);
			percentSlider.value = RitualManager.instance.rainRitual.probability;
		}

	}
	
}
