reste a lier couloir_ami avec la fin ou un retour au menu

This commit is contained in:
Florian Ehr 2021-01-15 17:03:56 +01:00
parent 4f7e5d74f0
commit 9250d1de6b
2 changed files with 10 additions and 10 deletions

View file

@ -18,17 +18,17 @@
<main id="main"> <main id="main">
<section id="content"> <section id="content">
<article id="text"> <article id="text">
<p class="firstText">Texte 1</p> <p class="firstText">Votre fidèle acolyte <span class="nomAmi"></span> et vous-mêmes revenez sur les lieux</p>
<P class="textWillAppear">texte 2</p> <P class="textWillAppear">Vous apercevez de nouveau cette personne, il a l'air de se rendre au sous-sol quotidiennement</p>
<p class="textWillAppear">texte 3</p> <p class="textWillAppear">Cette fois-ci, il ne vous court pas après</p>
<p class="textWillAppear">texte 4</p> <p class="textWillAppear">Que faites-vous ?</p>
<div id="arrowBlock"> <div id="arrowBlock">
<p id="space">Press enter</p> <p id="space">Press enter</p>
<img id="arrow" src="../Images/Lecture.png" alt="Texte suivant"/> <img id="arrow" src="../Images/Lecture.png" alt="Texte suivant"/>
</div> </div>
</article> </article>
<div id="buttons"> <div id="buttons">
<button id="button1" class="button" onclick="window.location.href = './aide_ami.html';" disabled=true>Non franchement <span id="nomAmi"></span>, je te jure je ne peux pas aller plus loin</button> <button id="button1" class="button" onclick="window.location.href = './aide_ami.html';" disabled=true>"Non franchement <span class="nomAmi"></span>, je te jure je ne peux pas aller plus loin"</button>
<button id="button2" class="button" onclick="window.location.href = './crypto_seul.html';" disabled=true>Attendre qu'ils rentrent, prendre votre courage à quatre mains, et s'aventurer jusqu'à cette salle</button> <button id="button2" class="button" onclick="window.location.href = './crypto_seul.html';" disabled=true>Attendre qu'ils rentrent, prendre votre courage à quatre mains, et s'aventurer jusqu'à cette salle</button>
</div> </div>
</section> </section>

View file

@ -4,18 +4,18 @@ let texts = document.getElementsByClassName("textWillAppear");
let buttonBox = document.getElementById("buttons"); let buttonBox = document.getElementById("buttons");
let arrow = document.getElementById("arrow"); let arrow = document.getElementById("arrow");
let space = document.getElementById("space"); let space = document.getElementById("space");
let nomAmi = document.getElementById("nomAmi"); let nomAmi = document.getElementsByClassName("nomAmi");
console.log(texts) console.log(nomAmi[0])
let NB_TEXTS = texts.length; let NB_TEXTS = texts.length;
let NB_BUTTONS = 1; let NB_BUTTONS = 1;
let NB_ELEMENTS_TO_APPEAR = NB_TEXTS + NB_BUTTONS; let NB_ELEMENTS_TO_APPEAR = NB_TEXTS + NB_BUTTONS;
//------------------ Fonctions ------------------// //------------------ Fonctions ------------------//
for (let i = 0 ; i<nomAmi.length ; i++) {
nomAmi.innerHTML = localStorage.getItem('friendPseudo'); nomAmi[i].innerHTML = localStorage.getItem('friendPseudo');
}
//gère les apparitions et disparitions des textes //gère les apparitions et disparitions des textes
function makeNextTextAppear(event) { function makeNextTextAppear(event) {
if (p_counter < NB_ELEMENTS_TO_APPEAR) { if (p_counter < NB_ELEMENTS_TO_APPEAR) {