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