- 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 to all? (CH1)
B) Abstract Factory
- 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 a Rigidbody. Your player has a collider and Rigidbody 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)
A) The doorway's collider is not marked as a trigger.
B) The light game object needs a trigger as well.
C) You don't need multiple Rigidbody...