This section of programming will detail all the programming aspects of the UI section for project 3, The Vendorbus Game. This will feature the scripts that are used in making the UI for the game as well as how to make a simple basic UI, why I decide to make it that way and the design choices I made in allowing the script to play the way it is.
Essentially, the basics of how to make a basic change scene such as new game and quit game is the use of Application.
Application.Quit(); allows you to quit the game.
Application.LoadLevel(“LevelName”) allows you to change scene into that level from which it is named.
It is also rather simple on how the methodology behind the program works. The basics of it is that you use a function, namely an OnClick function, make it public and drag the basic script to the canvas, apply the script from the button component.
The section on the OnClick() section, drag the canvas into the section that has the clock-like sign on it and apply the script you had and the function that is in it which plays that function.
The simple function allows you to change between scenes such as changing scenes from the Application or change values, which allows you to change between different scenes and allows for you to switch between gameobjects. This is helpful in how-to-play instructions which are simply an instruction manual which allows for easier flexibility and design choices between how it works and how it plays off of one another.
The reasons why it is designed this way is because the flexibility of changing scenes allows you to make it easier to code and make it manageable to work off of in the game without it being too heavily variable-reliant. Instructions and images are placed as shown below and buttons work after several iterations of the playtesting. One of the reasons being is that the back button and the next button is swapped in its values and after testing, that problem is fixed.
The section is in reverse at one point and it was swapped at some point later.
That section covers the UI.