19 April 2015

Adding a restart button

As mentioned in my previous post First Square Follow feedback adding a restart button will improve user friendliness in a way so that players won't accidentally skip their score when the game is over.

To add a working button quickly and easily all I had to do was return to the OnGui function, and add the following piece of code when the game is over:

The if statement automatically adds a click event listener which allows the button to trigger the function once the player presses it, and then there's the positioning and what text the button will say, in this case 'Again?'.

This is what the button (and the earlier this month mentioned highscore) look like in practice:
Tomorrow I'll get my first wave of playtesters to try the updated version of Square Follow.

No comments:

Post a Comment