Hi, I’m very new to Unity and have a task to make a Roll-a-Ball game with 3 levels, but I can’t go past the second one.
void SetCountText ()
{
countText.text = "Count: " + count.ToString ();
if (count >= 10)
{
WinText.text = ("You Win! Hooray!");
Application.LoadLevel("MiniGamel");
}
The code here shows that after the player has collected the required number of items and the win text appears on the screen, the player moves to the next level. But I don’t know how to send a player to the third level after completing the second level.
{
if (count >= 15)
{
WinText.text = ("You Win! Hooray!");
Application.LoadLevel("MiniGamel2");
}
I tried to increase the number of items on the second level so that after the player moved to it, this number of items would carry them to the third level, but as soon as I collect 10 items, the second level starts over, not allowing me to pick up the rest of the items.
What could solve my problem?