using UnityEngine;
using System.Collections;

public class ProgressManager : MonoBehaviour {

	public Transform pointA;
	public Transform pointB;

	bool stopped=false;
	
	void Start()
	{
		rigidbody2D.velocity= new Vector2(0, (pointB.transform.position.y-pointA.transform.position.y)/60.0f);
	}

	void Update()
	{
		if(Time.time>=60.0f)
		{
			if(!stopped)
			{
				rigidbody2D.velocity= new Vector2(0,0);
				rigidbody2D.position.Set(pointB.transform.position.x,pointB.transform.position.y);
				stopped=true;
			}
		}
	}
}
