using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Road : MonoBehaviour {
public GameObject plance;
public Renderer planeRenderer;
public float speed = 1f;
private Vector2 offset;
// Use this for initialization
void Start () {
planeRenderer = plance.GetComponent<Renderer ();
}
// Update is called once per frame
void Update () {
offset.y += -speed * Time.deltaTime;
planeRenderer.material.SetTextureOffset ("_MainTex", offset);
}
}