using UnityEngine;
using System.Collections;

public class ScoreGained : MonoBehaviour
{
		TweenPosition tweenPos;
		
		public void Init (string scoreText, Transform parent, Vector3 position)
		{
				this.GetComponent<UILabel> ().text = scoreText;
				this.transform.parent = parent;
				this.transform.position = position;
				this.transform.localScale = Vector3.one;
				tweenPos = this.GetComponent<TweenPosition> ();
				tweenPos.SetStartToCurrentValue ();
				Vector3 toPos = this.transform.localPosition;
				toPos.y += 200;
				tweenPos.to = toPos;
		}
		
		
		public void DestroyMe ()
		{
				NGUITools.Destroy (this.gameObject);
		}
		
		
}
