All pastes #2118300 Raw Edit

Someone

public text v1 · immutable
#2118300 ·published 2012-02-17 02:11 UTC
rendered paste body
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);
	
	}
}