History

Fix issues in several tutorial scripts

Ryan Huffman committed 10 years ago

Commit 97fbdc71 parent e58cd534 files · +24 −7Browse files

Showing the changes to tutorial/tutorialZone.js (1 of 4 files). Show all

Unified · Split

tutorial/tutorialZone.js+13−2
@@ -59,11 +59,13 @@ if (!Function.prototype.bind) { · 58 unmodified lines
5959 print("TutorialZone | Preload");
6060 this.entityID = entityID;
6161 },
62− start: function() {
63− print("TutorialZone | Got start");
62+ onEnteredStartZone: function() {
63+ print("TutorialZone | Got onEnteredStartZone");
6464 var self = this;
6565 if (!this.token) {
6666 print("TutorialZone | Creating token");
67+ // The start zone has been entered, hide the overlays immediately
68+ Menu.setIsOptionChecked("Overlays", false);
6769 this.token = new OwnershipToken(Math.random() * 100000, this.entityID, {
6870 onGainedOwnership: function(token) {
6971 print("TutorialZone | GOT OWNERSHIP");
@@ -91,6 +93,15 @@ if (!Function.prototype.bind) { · 21 unmodified lines
9193 });
9294 }
9395 },
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+ },
94105
95106 enterEntity: function() {
96107 print("TutorialZone | ENTERED THE TUTORIAL AREA");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t