All pastes #2118303 Raw Edit

Something

public text v1 · immutable
#2118303 ·published 2012-02-17 02:37 UTC
rendered paste body
using UnityEngine;
using System.Collections;

public class Background : MonoBehaviour {
	
	public float speed;
	private float amtToMove; 
	private Vector3 rot;
	// Use this for initialization
	void Start () {
		Vector3 rot = 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(rot*Time.deltaTime,Space.World);
		if(transform.rotation.y>=15)
			rot=new Vector3(0,-1,0);		
	
	}
}