using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlaneMove : MonoBehaviour {
private Material ScrollMaterial;
// Use this for initialization
void Start () {
this.ScrollMaterial = GetComponent<Renderer> ().material;
}
// Update is called once per frame
void Update () {
this.ScrollMaterial.mainTextureOffset =- new Vector3 (Time.time,0)*0.3f;
if(transform.position.y>=20){
Destroy (this.gameObject);
}
}
}