(per contesto dice di non toccare il suo bellissimo capibara)
var Touches = 0;
const ON_TOUCH_TEXTES = [
"Ehy, ti ho detto di non toccarlo, ricordi è molto delicato",
"non toccarlo più perfavore, è molto delicato, gli stai facendo male",
"Dai, Perfavore non toccarlo più",
"Giuro che se lo tocchi un'altra volta urlo",
"Smettila di toccarlo!!!",
"...",
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Ok, l'hai voluto tu...",
]
const capybaraImage = document.getElementById("capybaraImage");
const capybaraImage2 = document.getElementById("capybaraJumpscare");
const capybaraJumpscare = document.getElementById("capybaraJumpscareAudio");
function onCapybaraTouch() {
if (Touches < ON_TOUCH_TEXTES.length) {
alert(ON_TOUCH_TEXTES[Touches]);
Touches += 1;
} else {
capybaraImage2.style.display = "block"
capybaraJumpscare.play()
}
}
capybaraImage.addEventListener("click", onCapybaraTouch);
1 comment