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

public class CopyrightFollow : MonoBehaviour
{
    public RectTransform mainCredits;

    private Vector3 offset;
    private bool follow;

	// Use this for initialization
	void Start ()
    {
        follow = true;
        offset = transform.localPosition;
	}
	
	// Update is called once per frame
	void Update ()
    {
	    if (follow)
        {
            transform.localPosition = new Vector3(transform.localPosition.x,mainCredits.localPosition.y + offset.y + 50, transform.localPosition.z);
        }
        if (transform.localPosition.y >= 0)
        {
            follow = false;
        }
	}
}
