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 | print("TutorialZone | Preload"); | 59 | print("TutorialZone | Preload"); |
| 60 | this.entityID = entityID; | 60 | this.entityID = entityID; |
| 61 | }, | 61 | }, |
| 62 | start: function() { | 62 | onEnteredStartZone: function() { |
| 63 | print("TutorialZone | Got start"); | 63 | print("TutorialZone | Got onEnteredStartZone"); |
| 64 | var self = this; | 64 | var self = this; |
| 65 | if (!this.token) { | 65 | if (!this.token) { |
| 66 | print("TutorialZone | Creating token"); | 66 | print("TutorialZone | Creating token"); |
| 67 | // The start zone has been entered, hide the overlays immediately | ||
| 68 | Menu.setIsOptionChecked("Overlays", false); | ||
| 67 | this.token = new OwnershipToken(Math.random() * 100000, this.entityID, { | 69 | this.token = new OwnershipToken(Math.random() * 100000, this.entityID, { |
| 68 | onGainedOwnership: function(token) { | 70 | onGainedOwnership: function(token) { |
| 69 | print("TutorialZone | GOT OWNERSHIP"); | 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 | enterEntity: function() { | 106 | enterEntity: function() { |
| 96 | print("TutorialZone | ENTERED THE TUTORIAL AREA"); | 107 | print("TutorialZone | ENTERED THE TUTORIAL AREA"); |