Showing the changes to tutorial/tutorialZone.js (1 of 2 files). Show all
Unified · Split
| @@ -27,10 +27,14 @@ if (!Function.prototype.bind) { · 26 unmodified lines | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | (function() { |
| 30 | − var ownershipTokenPath = Script.resolvePath("ownershipToken.js"); | |
| 31 | − var tutorialPath = Script.resolvePath("tutorial.js"); | |
| 32 | − Script.include(ownershipTokenPath); | |
| 33 | − Script.include(tutorialPath); | |
| 30 | + Script.include("ownershipToken.js"); | |
| 31 | + Script.include("tutorial.js"); | |
| 32 | + | |
| 33 | + var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable"; | |
| 34 | + function setAwayEnabled(value) { | |
| 35 | + var message = value ? 'enable' : 'disable'; | |
| 36 | + Messages.sendLocalMessage(CHANNEL_AWAY_ENABLE, message); | |
| 37 | + } | |
| 34 | 38 | |
| 35 | 39 | var TutorialZone = function() { |
| 36 | 40 | print("TutorialZone | Creating"); |
| @@ -65,7 +69,9 @@ if (!Function.prototype.bind) { · 28 unmodified lines | ||
| 65 | 69 | if (!this.token) { |
| 66 | 70 | print("TutorialZone | Creating token"); |
| 67 | 71 | // The start zone has been entered, hide the overlays immediately |
| 72 | + setAwayEnabled(false); | |
| 68 | 73 | Menu.setIsOptionChecked("Overlays", false); |
| 74 | + MyAvatar.shouldRenderLocally = false; | |
| 69 | 75 | this.token = new OwnershipToken(Math.random() * 100000, this.entityID, { |
| 70 | 76 | onGainedOwnership: function(token) { |
| 71 | 77 | print("TutorialZone | GOT OWNERSHIP"); |
| @@ -100,6 +106,8 @@ if (!Function.prototype.bind) { · 28 unmodified lines | ||
| 100 | 106 | // re-enable the HUD/Overlays |
| 101 | 107 | if (!self.tutorialManager) { |
| 102 | 108 | Menu.setIsOptionChecked("Overlays", true); |
| 109 | + MyAvatar.shouldRenderLocally = true; | |
| 110 | + setAwayEnabled(true); | |
| 103 | 111 | } |
| 104 | 112 | }, |
| 105 | 113 | |