using UnityEngine;
using System.Collections;

public class MoveBackground : MonoBehaviour
{


    public bool ativado;
    public Vector3 proximo;

    public float velocidade;


    void Awake()
    {
        proximo = transform.position;
    }

    void Update()
    {
        transform.position = Vector3.Lerp(transform.position, proximo, Time.deltaTime * velocidade);

    }
    public void PararBackground()
    {
        proximo = transform.position;
    }

}

   