Merge pull request #2 from PedrosUsername/feature/amogus
Approved Pedro's pull req with great pleasure
This commit is contained in:
commit
061ac35219
BIN
assets/video/aprovar.mp4
Normal file
BIN
assets/video/aprovar.mp4
Normal file
Binary file not shown.
BIN
assets/video/desaprovar.mp4
Normal file
BIN
assets/video/desaprovar.mp4
Normal file
Binary file not shown.
|
@ -53,6 +53,15 @@ body {
|
|||
font-size: 25px;
|
||||
}
|
||||
|
||||
.floatleft {
|
||||
position: absolute;
|
||||
left: 2%;
|
||||
top: 5%;
|
||||
width: 20%;
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
#wrong {
|
||||
background-color: black;
|
||||
display: none;
|
||||
|
|
10
index.html
10
index.html
|
@ -42,6 +42,16 @@
|
|||
<h1>The Social Credit Score Game</h1>
|
||||
<img src="assets/img/play.png">
|
||||
</div>
|
||||
<div id="rock-approves" class="floatleft">
|
||||
<video id="rock-approves-video" style="width: 100%;" muted>
|
||||
<source src="assets/video/aprovar.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
<div id="rock-disapproves" class="floatleft">
|
||||
<video id="rock-disapproves-video" style="width: 100%;">
|
||||
<source src="assets/video/desaprovar.mp4" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
<div id="wrong" class="floattop">
|
||||
<img src="assets/img/wrong.png">
|
||||
</div>
|
||||
|
|
37
js/main.js
37
js/main.js
|
@ -49,6 +49,18 @@ function displayQuestion() {
|
|||
}
|
||||
else {
|
||||
var index = 0;
|
||||
|
||||
// sends comrad Dwayne to help (or calls him back)
|
||||
if (total > 4000 ) {
|
||||
$("#rock-approves").hide();
|
||||
$("#rock-disapproves").hide();
|
||||
}
|
||||
else{
|
||||
$("#rock-approves-video").get(0).currentTime = 0;
|
||||
$("#rock-approves").show();
|
||||
}
|
||||
// **************************************
|
||||
|
||||
if (indexesProgress < indexeslist.length) {
|
||||
index = indexeslist[indexesProgress];
|
||||
indexesProgress++;
|
||||
|
@ -68,6 +80,31 @@ function displayQuestion() {
|
|||
$("#questionTitle").html(data["questions"][index]["title"]);
|
||||
}
|
||||
}
|
||||
|
||||
// comrad Dwaynes feedback *************************
|
||||
$(".ans").mouseenter(function(){
|
||||
var res = cQuestion["answers"][$(this).attr("data-ans") - 1]["effect"];
|
||||
|
||||
if ( ( total <= 4000 ) && ( res < 0 ) ) {
|
||||
$("#rock-approves").hide();
|
||||
$("#rock-disapproves").show();
|
||||
$("#rock-disapproves-video").get(0).currentTime = 0;
|
||||
$("#rock-disapproves-video").get(0).play();
|
||||
}
|
||||
|
||||
});
|
||||
$(".ans").mouseleave(function(){
|
||||
var res = cQuestion["answers"][$(this).attr("data-ans") - 1]["effect"];
|
||||
|
||||
if ( ( total <= 4000 ) && ( res < 0 ) ) {
|
||||
$("#rock-disapproves").hide();
|
||||
$("#rock-approves").show();
|
||||
$("#rock-approves-video").get(0).currentTime = 0;
|
||||
$("#rock-approves-video").get(0).play();
|
||||
}
|
||||
});
|
||||
// ***8888888************************************8
|
||||
|
||||
$(".ans").click(function () {
|
||||
var res = cQuestion["answers"][$(this).attr("data-ans") - 1]["effect"];
|
||||
total += res;
|
||||
|
|
Loading…
Reference in New Issue
Block a user