using UnityEngine;
using System.Collections;
public class Background : MonoBehaviour {
public float speed;
private float amtToMove;
private Vector3 down;
// Use this for initialization
void Start () {
Vector3 down = new Vector3(0,-1,0);
}
// Update is called once per frame
void Update () {
amtToMove=speed * Time.deltaTime;
transform.Translate(Vector3.down * amtToMove,Space.World);
transform.Rotate(Vector3.up*Time.deltaTime,Space.World);
if(transform.rotation.y>=15)
transform.Rotate(down*Time.deltaTime,Space.World);
}
}