Reader small image

You're reading from  Creating E-Learning Games with Unity

Product typeBook
Published inMar 2014
Reading LevelIntermediate
Publisher
ISBN-139781849693424
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
David Horachek
David Horachek
author image
David Horachek

David Horachek is a video game software developer with over 13 years of experience in programming arcade, home console, and portable games. He has programmed game projects published by Midway Games, EA, Ubisoft, SEGA, and others. He develops games under the Arbelos Interactive label.
Read more about David Horachek

Right arrow

Creating the ShowLevel3Results response


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:

  1. Create a new npcResponse class named response_ShowLevel3Results. Change the parent class from MonoBehavior to npcResponse.

  2. Open the scene file from the last gameplay level TESTBED1.

  3. Copy the popup_Level1Finished Prefab by pressing Ctrl + C.

  4. Open the scene file from the last gameplay level TESTBED3.

  5. Paste this GameObject beneath the hierarchy of MainCamera. Rename the popup_Level3Finish object as shown in the following code:

  6. Add an instance of the response_ShowLevel3Results script to LevelLogicObj.

  7. Drag-and-drop a reference to this script into the Response field beside condition_addScore in decisionMgr for LevelLogicObj.

  8. Drag-and-drop a reference from popup_Level3Finish (inside the MainCamera...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Creating E-Learning Games with Unity
Published in: Mar 2014Publisher: ISBN-13: 9781849693424

Author (1)

author image
David Horachek

David Horachek is a video game software developer with over 13 years of experience in programming arcade, home console, and portable games. He has programmed game projects published by Midway Games, EA, Ubisoft, SEGA, and others. He develops games under the Arbelos Interactive label.
Read more about David Horachek