-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeekWeek.html
70 lines (49 loc) · 1.48 KB
/
geekWeek.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html>
<html>
<head>
<meta charset= 'utf-8'>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body id ='target'>
<!-- 930x320 -->
<canvas id='canvas_Bg' width = '920px' height ='320px'></canvas>
<canvas id='logo' width = '920px' height ='320px'></canvas>
<canvas id='geek' width = '920px' height = '320px'></canvas>
<canvas id='obstacle' width = '920px' height = '320px'></canvas>
<canvas id='bowtie' width = '920px' height = '320px'></canvas>
<!--May have to combine these two-->
<canvas id='lives' width = '920px' height = '320px'></canvas>
<canvas id='score' width = '920px' height = '320px'></canvas>
<canvas id='poof' width = '920px' height = '320px'></canvas>
<script src= 'gameLogic.js'></script>
<script src='http://code.jquery.com/jquery-latest.js'></script>
<script type="text/javascript">
$(document).ready(function(){
$("#canvas_Bg").click(function() {
$(this).css('z-index', 0);
});
$(window).keydown(function(e){
switch(e.which) {
case 32:
window.clearInterval(alexIsAwesome);
alexIsAwesome = false;
console.log('space');
break;
case 37:
break;
case 39:
break;
}
if(alexIsAwesome === false) {
alexIsLegit();
}
});
function alexIsLegit() {
animate();
alexIsAwesome = setInterval(function(){ animate() }, 1000);
console.log('setInterval');
}
});
</script>
</body>
</html>