Skip to content

Instantly share code, notes, and snippets.

@AdrienGiboire
Last active February 13, 2016 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdrienGiboire/29f4a7ff25e41db35d04 to your computer and use it in GitHub Desktop.
Save AdrienGiboire/29f4a7ff25e41db35d04 to your computer and use it in GitHub Desktop.
function drawInfoBulle (style, image, text) {
var infoBulle = document.getElementById("infoBulle"),
infoBulleImg = document.getElementById("infoBulleImg"),
infoBulleTxt = document.getElementById("infoBulleTxt");
infoBulle.style.margin = style;
infoBulleImg.innerHTML = image;
infoBulleTxt.innerHTML = text;
}
drawInfoBulle(
"100px 0 0 201px",
"<img src='img/tuto/3.png'>",
"Pour jouer, vous allez créer une suite de six actions qui seront jouées dans l'ordre. Par exemple ici :<br/><br/><em>Créer, détruire, créer, créer, détruire, ramasser.</em>"
);
drawInfoBulle(
"100px 0 0 201px",
"<img src='img/tuto/2.png'>",
"Ces dessins sont des actions. Il y en a trois :<br/><ul><strong><li>Créer des points</li><li>Les ramasser</li><li>Tout détruire</li></strong></ul>Pensez à PacMan : dans son labyrinthe il y a ces points, que vous ramassez avec Pacman. S'il rencontre un fantome, il est détruit."
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment