using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class InfluenceMove : MonoBehaviour {
    CircleCollider2D c;
    private Vector3 screenPoint;
    private Vector3 offset;

    // Use this for initialization
    void Start () {
        c = this.GetComponent<CircleCollider2D>();
	}

	// Update is called once per frame
    void Update()
    {
        if (GlobalVariables.paused) return;

        if (Input.GetMouseButton(0) && c.transform.position.x<50)
        {
            screenPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            Vector3 newScreenPoint = new Vector3(screenPoint.x, screenPoint.y, 0);
            c.transform.position = Vector3.Lerp(c.transform.position, newScreenPoint, 0.5f);
        }
    }
   

}
