﻿using UnityEngine;
using System.Collections;

public class StreetFlow : MonoBehaviour
{
    public float scrollSpeed = 1f;
    private Renderer rend;

    void Start()
    {
        rend = GetComponent<Renderer>();
    }

    void Update()
    {
        float offset = Time.time * scrollSpeed;
        rend.material.SetTextureOffset("_MainTex", new Vector2(0, -offset));
    }
}
