Showing the changes to tutorial/tutorialZone.js (1 of 4 files). Show all
Unified · Split
| @@ -59,11 +59,13 @@ if (!Function.prototype.bind) { · 58 unmodified lines | ||
| 59 | 59 | print("TutorialZone | Preload"); |
| 60 | 60 | this.entityID = entityID; |
| 61 | 61 | }, |
| 62 | − start: function() { | |
| 63 | − print("TutorialZone | Got start"); | |
| 62 | + onEnteredStartZone: function() { | |
| 63 | + print("TutorialZone | Got onEnteredStartZone"); | |
| 64 | 64 | var self = this; |
| 65 | 65 | if (!this.token) { |
| 66 | 66 | print("TutorialZone | Creating token"); |
| 67 | + // The start zone has been entered, hide the overlays immediately | |
| 68 | + Menu.setIsOptionChecked("Overlays", false); | |
| 67 | 69 | this.token = new OwnershipToken(Math.random() * 100000, this.entityID, { |
| 68 | 70 | onGainedOwnership: function(token) { |
| 69 | 71 | print("TutorialZone | GOT OWNERSHIP"); |
| @@ -91,6 +93,15 @@ if (!Function.prototype.bind) { · 21 unmodified lines | ||
| 91 | 93 | }); |
| 92 | 94 | } |
| 93 | 95 | }, |
| 96 | + onLeftStartZone: function() { | |
| 97 | + print("TutorialZone | Got onLeftStartZone"); | |
| 98 | + | |
| 99 | + // If the start zone was exited, and the tutorial hasn't started, go ahead and | |
| 100 | + // re-enable the HUD/Overlays | |
| 101 | + if (!self.tutorialManager) { | |
| 102 | + Menu.setIsOptionChecked("Overlays", true); | |
| 103 | + } | |
| 104 | + }, | |
| 94 | 105 | |
| 95 | 106 | enterEntity: function() { |
| 96 | 107 | print("TutorialZone | ENTERED THE TUTORIAL AREA"); |