The ShowLevel3Results
class will be used to show the success pop up (and some associated cleanup) if the user achieves enough points. It will be dispatched by npcDecisionMgr
of LevelLogicObj
in this level. Perform the following steps to create the ShowLevel3Results
response:
Create a new
npcResponse
class namedresponse_ShowLevel3Results
. Change the parent class fromMonoBehavior
tonpcResponse
.Open the scene file from the last gameplay level
TESTBED1
.Copy the
popup_Level1Finished
Prefab by pressing Ctrl + C.Open the scene file from the last gameplay level
TESTBED3
.Paste this GameObject beneath the hierarchy of MainCamera. Rename the
popup_Level3Finish
object as shown in the following code:Add an instance of the
response_ShowLevel3Results
script toLevelLogicObj
.Drag-and-drop a reference to this script into the Response field beside
condition_addScore
indecisionMgr
forLevelLogicObj
.Drag-and-drop a reference from
popup_Level3Finish
(inside the MainCamera...