Cleanup client controller display implementation in tutorial

This commit is contained in:
Ryan Huffman 2016-10-27 15:01:11 -07:00
parent d577493d5e
commit 8a7f67c849

View file

@ -250,10 +250,10 @@ var stepDisableControllers = function(name) {
} }
stepDisableControllers.prototype = { stepDisableControllers.prototype = {
start: function(onFinish) { start: function(onFinish) {
HMD.requestShowHandControllers();
disableEverything(); disableEverything();
HMD.requestShowHandControllers();
onFinish(); onFinish();
}, },
cleanup: function() { cleanup: function() {
@ -276,8 +276,6 @@ function disableEverything() {
hideEntitiesWithTag('finish'); hideEntitiesWithTag('finish');
controllerDisplayManager = new ControllerDisplayManager();
setAwayEnabled(false); setAwayEnabled(false);
} }
@ -295,7 +293,6 @@ function reenableEverything() {
setControllerPartLayer('touchpad', 'blank'); setControllerPartLayer('touchpad', 'blank');
setControllerPartLayer('tips', 'blank'); setControllerPartLayer('tips', 'blank');
MyAvatar.shouldRenderLocally = true; MyAvatar.shouldRenderLocally = true;
HMD.requestHideHandControllers();
setAwayEnabled(true); setAwayEnabled(true);
} }
@ -313,6 +310,7 @@ var stepEnableControllers = function(name) {
stepEnableControllers.prototype = { stepEnableControllers.prototype = {
start: function(onFinish) { start: function(onFinish) {
reenableEverything(); reenableEverything();
HMD.requestHideHandControllers();
onFinish(); onFinish();
}, },
cleanup: function() { cleanup: function() {
@ -1099,6 +1097,7 @@ TutorialManager = function() {
this.stopTutorial = function() { this.stopTutorial = function() {
if (currentStep) { if (currentStep) {
currentStep.cleanup(); currentStep.cleanup();
HMD.requestHideHandControllers();
} }
reenableEverything(); reenableEverything();
currentStepNum = -1; currentStepNum = -1;