Full mock exam
- One of your junior programmers has asked for a global instance with a class that can be accessed anywhere in the code of the game. What design pattern would fulfill this requirement when you could have code that acts as a manager? (CH1)
- Prototype
- Abstract Factory
- Singleton
- Builder
- You have been asked by your head of development to make it so whenever a player walks through a doorway, a light next to the door will turn on. You have made an
OnTriggerEnter()
script that enables a light and added a collider to your doorway with aRigidbody
. Your player has a collider andRigidbody
as well. When you run the game to test your code, the light doesn't turn on.
What is most likely the cause of this issue? (CH2)
- The doorway's collider is not marked as a trigger.
- The light game object needs a trigger as well.
- You don't need multiple
Rigidbody
components. - The doorway isn't connected up to the light.
- What function allows...