Transition between Levels

My first time posting. All is working in my game - runs smoothly.

However I do not like the quick transition when loading next level, feels abrupt.

I would like a pause and maybe a congratulations text, before the next level loads.

I have:

Invoke(“LoadNextLevel”, 3f)

However with this the ball is still active. And the player can loose.

I have deactivated the ball, however this then causes an issues with the last brick not destroying.
Can anyone help me?

When you say there is an issue with the last brick not being destroyed are you adding the code to stop the ball after you detect the last brick is destroyed and after the Destroy(gameObject); part of the script? If not it may be that part isn’t getting triggered.

Thank you Martyn.
This has fixed the problem! The object was destroying itself before triggering the next line of code.

Also I was getting a NullReferenceException message. I have fixed this. By seting the instance of the ball object, ball = FindObjectOfType();

From this i was able to deactive the ball (sprite & collider = false).

I just want to say thank you. The community of programmers are the most generous and helpful bunch :):smiley:

1 Like

Privacy & Terms