From e3ee7a2a11ce9a52b05c7a1c6cf4678d18f1a0b6 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 28 Oct 2016 13:42:17 -0700 Subject: [PATCH] Remove stepRaiseAboveHead --- tutorial/tutorial.js | 56 -------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/tutorial/tutorial.js b/tutorial/tutorial.js index 0fb86d7247..db5a4e4e3c 100644 --- a/tutorial/tutorial.js +++ b/tutorial/tutorial.js @@ -391,61 +391,6 @@ stepOrient.prototype = { } }; -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -// // -// STEP: Raise hands above head // -// // -/////////////////////////////////////////////////////////////////////////////// -var stepRaiseAboveHead = function(name) { - this.tag = name; - this.tempTag = name + "-temporary"; -} -stepRaiseAboveHead.prototype = { - start: function(onFinish) { - var tag = this.tag; - - var STATE_START = 0; - var STATE_HANDS_DOWN = 1; - var STATE_HANDS_UP = 2; - this.state = STATE_START; - - editEntitiesWithTag(this.tag, { visible: true }); - - // Wait 2 seconds before starting to check for hands - this.checkIntervalID = null; - function checkForHandsAboveHead() { - debug("RaiseAboveHead | Checking hands"); - if (this.state == STATE_START) { - if (MyAvatar.getLeftPalmPosition().y < (MyAvatar.getHeadPosition().y - 0.1)) { - this.state = STATE_HANDS_DOWN; - } - } else if (this.state == STATE_HANDS_DOWN) { - if (MyAvatar.getLeftPalmPosition().y > (MyAvatar.getHeadPosition().y + 0.1)) { - this.state = STATE_HANDS_UP; - Script.clearInterval(this.checkIntervalID); - this.checkIntervalID = null; - playSuccessSound(); - onFinish(); - } - } - } - this.checkIntervalID = Script.setInterval(checkForHandsAboveHead.bind(this), 500); - }, - cleanup: function() { - debug("RaiseAboveHead | Cleanup"); - if (this.checkIntervalID) { - Script.clearInterval(this.checkIntervalID); - this.checkIntervalID = null - } - if (this.waitTimeoutID) { - Script.clearTimeout(this.waitTimeoutID); - this.waitTimeoutID = null; - } - editEntitiesWithTag(this.tag, { visible: false, collisionless: 1 }); - deleteEntitiesWithTag(this.tempTag); - } -}; /////////////////////////////////////////////////////////////////////////////// @@ -1036,7 +981,6 @@ TutorialManager = function() { STEPS = [ new stepStart("start"), new stepOrient("orient"), - //new stepRaiseAboveHead("raiseHands"), new stepNearGrab("nearGrab"), new stepFarGrab("farGrab"), new stepEquip("equip"),