Showing the changes to tutorial/tutorialStartZone.js (1 of 15 files). Show all
Unified · Split
| @@ -8,20 +8,21 @@ · 7 unmodified lines | |||
| 8 | }, | 8 | }, |
| 9 | enterEntity: function() { | 9 | enterEntity: function() { |
| 10 | // send message to outer zone | 10 | // send message to outer zone |
| 11 | print("ENTERED THE TUTORIAL START AREA"); | 11 | print("Entered the tutorial start area"); |
| 12 | var parentID = Entities.getEntityProperties(this.entityID, 'parentID').parentID; | 12 | if (HMD.isHMDAvailable() && HMD.isHandControllerAvailable()) { |
| 13 | print("HERE", parentID); | 13 | var parentID = Entities.getEntityProperties(this.entityID, 'parentID').parentID; |
| 14 | if (parentID) { | 14 | if (parentID) { |
| 15 | print("HERE2"); | 15 | Entities.callEntityMethod(parentID, 'start'); |
| 16 | Entities.callEntityMethod(parentID, 'start'); | 16 | } else { |
| 17 | print("HERE4"); | 17 | print("ERROR: No parent id found on tutorial start zone"); |
| 18 | } | ||
| 18 | } else { | 19 | } else { |
| 19 | print("HERE3"); | 20 | Window.alert("To proceed with this tutorial, please connect your VR headset and hand controllers."); |
| 20 | print("ERROR: No parent id found on tutorial start zone"); | 21 | location = "/"; |
| 21 | } | 22 | } |
| 22 | }, | 23 | }, |
| 23 | leaveEntity: function() { | 24 | leaveEntity: function() { |
| 24 | print("EXITED THE TUTORIAL START AREA"); | 25 | print("Exited the tutorial start area"); |
| 25 | } | 26 | } |
| 26 | }; | 27 | }; |
| 27 | 28 | ||