I have started to add things into the game. The first things I have added are menus and level. The menu screen has a play button. Pressing this button will take the player to the level select screen. On the level select screen the player can pick a level. Picking a level will open the chosen level.
To do this I created 2 scripts. A menu script and a level menu script.
Below is the code for the level script. It has a function which is attached to a button in the unity editor. Pressing this button will run the code. The code will open the scene by checking the level int and opening the correct scene.

Below is the code for the main menu. The PlayButton function is attached to a button. When the button is pressed the level select menu will open.

The menu pressing play will take you to the level menu.

Pressing a level will take you to that level.

Level 1 at the moment

What is next.
My next goal is to add a gameover menu, gamewin menu, pause menu, back button and start implementing different levels.
Comments