Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Scroll text works, but load level is to fast!

$
0
0
I am using a script to load text on the screen and it scrolls down, wish it was up but my issue is that i added a load function at the bottom and it loads the level before it even scrolls the text. public var intro : String[]; public var off : float; public var speed = 50; function OnGUI() { off += Time.deltaTime * speed; for (var i = 0; i < intro.Length; i++) { var roff = (intro.Length*-20) + (i*20 + off); var alph = Mathf.Sin((roff/Screen.height)*180*Mathf.Deg2Rad); GUI.color = new Color(1,1,1, alph); GUI.Label(new Rect(650,roff,Screen.width, 30),intro[i]); GUI.color = new Color(1,1,1,1); Application.LoadLevel ("Level1"); } } How can i get it to wait for the text to finish?

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>