Cleaning and remove useless files

This commit is contained in:
Thomas FORGIONE
2015-09-01 09:51:57 +02:00
parent 8ac5391ce3
commit fc3aa07038
9 changed files with 19 additions and 117 deletions

View File

@@ -169,3 +169,11 @@ function appendTo(container) {
};
}
function setNextButton(target) {
$('#next').show();
$('#next').click(function() {
window.location = target;
$('#next').prop('disabled', true);
});
}

View File

@@ -19,7 +19,7 @@ var startCanvas;
window.onbeforeunload = function() {
if (initMainScene !== L3D.initPeach && initMainScene !== L3D.initSponza && Coin.total !== 8) {
if (initMainScene !== L3D.initPeach && initMainScene !== L3D.initSponza && !($('#next').is(":visible"))) {
return 'Warning : you are going to leave the page and abort the current test !';
@@ -27,25 +27,15 @@ window.onbeforeunload = function() {
};
var nextPage = '/prototype/game';
Coin.onCoinGot = function(coin) {
if (coin === 6) {
setTimeout(function() {
$('#next').show();
$('#next').click(function() {
window.location = '/prototype/next';
$('#next').prop('disabled', true);
});
}, 60*1000);
setTimeout(function() { setNextButton(nextPage); }, 60*1000);
}
};
Coin.onLastCoin = function() {
$('#next').show();
$('#next').click(function() {
window.location = '/prototype/next';
});
}
Coin.onLastCoin = function() { setNextButton(nextPage); };
function main() {

View File

@@ -210,13 +210,6 @@ TutorialSteps.prototype.nextStep = function() {
});
break;
case 17:
setTimeout(function() {
$('#next').show();
$('#next').click(function() {
window.location = '/before-begin';
});
}, 3*60*1000);
var cams = L3D.createPeachRecommendations(this.containerSize.width(), this.containerSize.height());
for (var i = 2; i < cams.length; i++) {
this.addRecommendation(cams[i]);

View File

@@ -18,18 +18,16 @@ var pointer;
var startCanvas;
var tutorial;
var nextPage = '/before-begin';
Coin.onCoinGot = function(val) {
if (val === 6) {
setTimeout(function() {
$('#next').show();
$('#next').click(function() {
window.location = '/prototype/game';
$('#next').unbind('click');
});
}, 60*1000);
setTimeout(function() {setNextButton(nextPage); }, 60*1000);
}
};
Coin.onLastCoin = function() { setNextButton(nextPage); };
function main() {
// Main container that holds everything