Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // On initialise le canvas
- ui.input = document.getElementById('user');
- ui.canvas = document.getElementById('skiff');
- ui.canvas.width = window.innerWidth;
- ui.canvas.height = window.innerHeight;
- ui.context = ui.canvas.getContext('2d');
- ui.canvas.addEventListener('click', checkClick, false);
- // On précharge toutes les ressources nécessaires
- ui.resources.loadSprites([ {
- title : 'logo', url : 'assets/images/logo.png'}
- , {
- title : 'game_over', url : 'assets/images/gameover.png'}
- , {
- title : 'rive_gauche_portrait', url : 'assets/images/riviere_gauche_portrait.png'}
- , ... ]) .then(function(value) {
- paintSkiff();
- }
- ).catch(function(err) {
- console.error("Error : %s \n %s", err.message, err.stack); }
- );
- }
Add Comment
Please, Sign In to add comment