using UnityEngine;
using System.Collections;

public class Popup : MonoBehaviour
{
		UITweener tweener;
		UIWidget widget;
		
		public bool hideable = true;
		
		// Use this for initialization
		void Start ()
		{
				tweener = this.GetComponent<UITweener> ();
				widget = this.GetComponent<UIWidget> ();
				tweener.SetStartToCurrentValue ();
				
				widget.leftAnchor.target = null;
				widget.rightAnchor.target = null;
				widget.topAnchor.target = null;
				widget.bottomAnchor.target = null;
		}
		
		public void Show ()
		{
				tweener.PlayForward ();
		}
		
		public void Hide ()
		{
				tweener.PlayReverse ();
		}
	
	
}
