Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (25 sloc) 0.736 kB
class Introduction {
HTMLCanvasElement canvas;
CanvasRenderingContext2D ctx;
HTMLImageElement img;
HTMLAudioElement audio;
Introduction(this.audio){
canvas = window.document.getElementById('canvas');
ctx = canvas.getContext('2d');
img = window.document.createElement('img');
img.src = "images/instructions.png";
img.onload = (e){
ctx.drawImage(img, 0 , 0);
canvas.onmousedown = clickListener;
};
}
//
void clickListener(MouseEvent e){
if(e.offsetX >= 276 && e.offsetX <= (276+113) && e.offsetY >= 576 && e.offsetY <= (576+192)){
ctx.clearRect(0,0,canvas.width, canvas.height);
canvas.onmousedown = (e){};
audio.pause();
new Game();
}
}
}
Jump to Line
Something went wrong with that request. Please try again.