top of page

Question Application

This is my first application created with Unity 2D. At first, this project confused me as I never learned C# programming. However, I learned various different key words to help me finish. My task was to make a child-friendly game. In the video, you can see that the first question asks the user what their name is. There is also an inputfield that the user can input their answer into. The inputfield was created by using the [SerializeField] command. I also put a confirm button next to the inputfield so that the text from question 1 would change into a response to the user. In the code for this program, I assigned the a variable to the input and converted it to string. Once I've done that, I changed the text to display the name the user had inputed. Next, I assigned the function to the button so when pressed, it would do exactly as written above. I also changed the text on the right of the question 1 and the below. On the right I put a dropdown so the user could choose the difficulty from easy to hard. When selected easy, the random number generator's range would be 1- 10, when the it's medium, 10-100, and when it's on hard, then the range becomes 100-1000. I did this by first analyzing the value of the dropdown using the button on the right of it. When pressed, the button would reset the numbers on the random texts, and change the numbers according to the dirfficulty selected. I also put the inputfield on the right of the equation so that the user could put in the answer. When the user presses the equal button, depending if the user is right or wrong, the picture and the text below would change. When the user is right, the cougar picture would change into a happy cougar picture and the text on the bottom would say that the user is correct. If the user is wrong, the picture would change into a sad cougar, and the text would change to say that the user is wrong and display the correct answer. The user can also change the dropdown value to decide if the equation would be addition, subtraction, division, and multiplication. The video displays all of these functions.

© 2023 by Graphic Design Porfolio. Proudly created with Wix.com

bottom of page