The
setupLevel2 Prefab will be activated when the user presses the start button on popup_Level2Start. It will finish the initialization of the mission for the level in the missionMgr
script. Let's perform the following steps to create the setupLevel2 Prefab:
Create a new Prefab named setupLevel2. Duplicate the
SetupMissionOne
script from mission one, and rename the duplicateSetupMissionTwo
. Add an instance to setupLevel2.Inside MonoDevelop, change the class declaration to
SetupMissionTwo
as shown in the following line of code:public class SetupMissionTwo : MonoBehavior {
We will use the same pattern for choosing random
QuizNpc
locators as we did for the flag locators in mission one. In addition to the QuizNpc Prefabs and the spawnPoints lists, add a list ofCorrectPopups
to the class.This class will hold the pop ups that are shown to the user when a correct answer is given for a particular quiz question. This will be populated by the user in the editor, and...