#pragma strict

var speed = 0.2; 
var crawling = true;

function addnl(text: String, n: int) {
	while (n--) text += "\n";
	return text;
}

function Start() {

	var tc = GetComponent(GUIText); 
	
	var creds = "ROAD DODGE: THE GAME";
	creds = addnl(creds, 15);
	
	creds += "Made at GGJ Barcelona 2015 in 48 hours";
	creds = addnl(creds, 15);
	
	creds += "Programming:\n\nAngel Rubio\nMario G. Munzon\nJesus Atalaya";
	creds = addnl(creds, 15);
	
	creds += "3D Art:\n\nSamuel Cohen\nAlexandra Escudero";
	creds = addnl(creds, 15);
	
	creds += "Sound:\n\nJesus Atalaya\nMario G. Munzon";
	creds = addnl(creds, 15);
	
	creds += "Ending Theme:\n Krestovsky - Magnets in the Gap\n CCLicense";
	creds = addnl(creds, 15);
	
	creds += "Other Themes and Sounds given by:\n Saint Google\n";
	creds = addnl(creds,15);
	
	creds += "Powered by:\n\nDivina Pedralbes\nTento\nRockstar\nBar Versalles\nEL BADUL-A-QUE\nEstrella Damm\nBallantines";
	creds = addnl(creds, 15);
	
	creds += "Special Thanks:\n\nDivina Pedralbes";
	creds = addnl(creds, 20);
	
	creds += "Only one animal was harmed\n in the making of this game.";
	creds = addnl(creds, 5);
	creds += "It is feeling better now.";
	creds = addnl(creds, 50);

	
	for (var i = 0; i < 99; ++i) {
		creds += "Apaga el ordenador y vete a la cama.";
		creds = addnl(creds, 10);
	}
	
	tc.text = creds; 

}

function Update ()
{
    if (!crawling) return;
    transform.Translate(Vector3.up *  Time.deltaTime*  speed);
    
    
    if (Input.anyKeyDown) {
    	Application.LoadLevel(0);
    }
 
}