Add blind animations for pigs and questions (more authentic)

This commit is contained in:
Alexander Hüllmandel 2019-08-21 15:13:48 +02:00
parent 2c954b3477
commit 9cebb7f6f0
No known key found for this signature in database
GPG Key ID: E9C3846E172253C4

View File

@ -300,15 +300,17 @@ function stopTimer() {
function startSchweinchen() { function startSchweinchen() {
if (runde == 2){ if (runde == 2){
$("#schweinchen2Img").fadeIn(); $("#schweinchen2Img").show("blind", { direction: "left" }, 1500);
} else if (runde == 3){ } else if (runde == 3){
$("#schweinchenImg").fadeIn(); $("#schweinchen3Img").show("blind", { direction: "left" }, 1500);
} else { } else {
$("#schweinchen1Img").fadeIn(); $("#schweinchen1Img").show("blind", { direction: "left" }, 1500);
} }
$("#answers").hide(); $("#answers").hide();
$("#displayQuestions").hide(); $("#displayQuestions").hide();
$("#result").hide();
$(".footer").hide();
if(sounds && (display || serverSound)) { if(sounds && (display || serverSound)) {
schweinchen = new Audio('./sounds/schweinchen.ogg'); schweinchen = new Audio('./sounds/schweinchen.ogg');
@ -322,11 +324,11 @@ function stopSchweinchen() {
$("#questionsSelect").val(index+1); $("#questionsSelect").val(index+1);
changeFrage(); changeFrage();
$("#schweinchenImg").hide(); $("#schweinchen3Img").hide();
$("#schweinchen1Img").hide(); $("#schweinchen1Img").hide();
$("#schweinchen2Img").hide(); $("#schweinchen2Img").hide();
$("#answers").show(); $("#result").show();
$("#displayQuestions").show(); $(".footer").show("blind", { direction: "left" }, 1500);
if(schweinchen) { if(schweinchen) {
schweinchen.pause(); schweinchen.pause();
} }
@ -375,7 +377,8 @@ function changeFrage() {
} }
function loadQuestionToGui(index) { function loadQuestionToGui(index) {
$("#schweinchenImg").hide(); console.log('oh noooo we are here');
$("#schweinchen3Img").hide();
$("#schweinchen1Img").hide(); $("#schweinchen1Img").hide();
$("#schweinchen2Img").hide(); $("#schweinchen2Img").hide();
$("#answers").empty(); $("#answers").empty();
@ -397,7 +400,7 @@ function loadQuestionToGui(index) {
if (isFinalMode){ if (isFinalMode){
$("#displayQuestions").hide(); $("#displayQuestions").hide();
} else { } else {
$("#displayQuestions").show(); $("#displayQuestions").show("blind", { direction: "left" }, 1500);
} }
var anzahlFragen = fragen[index]["antworten"].length; var anzahlFragen = fragen[index]["antworten"].length;
if (isFinalMode) { if (isFinalMode) {
@ -459,7 +462,8 @@ function loadQuestionToGui(index) {
} }
} }
if (!isFinalMode) { if (!isFinalMode) {
$("#SumRes").text("0"); $("#SumRes").text("0");
$("#answers").show("blind", { direction: "left" }, 1500);
} }
if(!display) if(!display)
$("#resultFinal").hide(); $("#resultFinal").hide();