win game condition

how to win a game by getting certain amount of score??

1 Answer

1

You might want to post a little more information. Do you already have your score working, and all the things that need to be completed in order to win? If so you would just load another scene.

Check this link out...

http://unity3d.com/support/documentation/ScriptReference/Application.LoadLevel.html

If not, you will need to create a score variable to track what your score is and at each update see if the score has hit the win amount. Then you can load another scene or some kind of GUI text to let the user know they won.

If you are still stuck on the score stuff 3dbuzz.com has a nice video for people just starting out with Unity and there is score code in his space shooter video you can look at.