This is the element to have text input.
What is Input Field?
This Unity feature allows control over the speed of time in the game.
What is Time.timeScale?
What is the design pattern used in class to implement persistent data?
What is Singleton
A die is rolled and a coin is tossed. Find the probability that the die shows an odd number and the coin shows a head.
The probability of both together is ¼
This is how you load a scene.
What is SceneManager.LoadScene()?
In Unity, which method is used to find all GameObjects with a specific tag?
What is FindObjectsWithTag?
This method in Unity is automatically called when a script is loaded, even before Start(). What is the name of this method?
What is Awake()
Assume that you pick two cards from a deck of cards (without replacing the first card before you pick the second). What is the probability that both are number cards
Thus the probability of them both being numbers are 9/13 * 35/51 = 315/663.
This is how you add text to a button.
What is modifying the child text element?
Which function in Unity is used to detect button clicks and execute corresponding actions?
What is OnClick
How do you set a value using PlayerPrefs in Unity, and what is the method to retrieve that value?
What is PlayerPrefs.SetInt("key", value) PlayerPrefs.SetFloat("key", value) PlayerPrefs.GetInt("key") PlayerPrefs.GetFloat("key")
Suppose you have just been given a certain tetronimo. What is the probability that the next piece will have the same shape, using the Random A strategy?
Random A: At every iteration, select a tetronimo at random from all seven possibilities
Each piece is drawn randomly, so the chance of you getting the same shape is 1/7
This method lets you detect which scene is currently loaded.
What is SceneManager.GetActiveScene()?
In Unity, which method is utilized to activate or deactivate a GameObject?
What is [GameObject].SetActive
This is how you declare arrays in Unity.
What is dragging and dropping elements in array data fields in the script component?
(I'll use this shorthand a lot, so just FYI: "2d6" means rolling two six-sided dice at once. So "4d10" means four ten-sided dice, and so on)
Rolling 2d6, what is the probability of rolling at least one 6?
The answer is: 6/36 + 6/36 - 1/36 = 11/36
This is where you add scenes for the game to access them at runtime.
What are Build Settings?
Set this to 0 to pause the game or 1 to resume
Time.timeScale?
A basic algorithm for storing top X high scores (Just a short overview of the algo)
What is using arrays to store high scores, and updated based on player score
(I'll use this shorthand a lot, so just FYI: "2d6" means rolling two six-sided dice at once. So "4d10" means four ten-sided dice, and so on)
Rolling 2d6, what is the probability of getting both 5s
The probability of a 5 on the first die is ⅙; the probability of a 5 on the second die is ⅙; the probability of both is an AND = 1/36