private bool isClick = false;
private void OnMouseDown()
{
isClick = ture;
}
private void OnMouseUp()
{
isClick = false;
}
private void Update()
{
if(isClick){
transform.position =Camera.main.ScreenToWorldPoint (Input.mousePosition);
transform.position += new Vector3 (0,0,10);
}
}