Quantcast
Channel: Questions in topic: "help me"
Viewing all articles
Browse latest Browse all 115

How do i load my next level?

$
0
0
i wrote out a function so when currentScore == 6 it loads level 2, but it wont do it.why? here's the script: #pragma strict static var currentScore : int = 0; var offsetY : float = 40; var sizeX : float = 100; var sizeY : float = 40; function Start (){ currentScore = 0; } function OnGUI (){ GUI.Box (new Rect (Screen.width/2-sizeX/2, offsetY, sizeX, sizeY), "Score: " + currentScore); } function LoadLevel() { if (currentScore == 6){ Application.LoadLevel("Level 2"); } }

Viewing all articles
Browse latest Browse all 115

Trending Articles



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