-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (34 loc) · 813 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script src="keyboard.js"></script>
<script src="konami.manager.js"></script>
<script type="text/javascript">
var manager = new KonamiManager(window);
/**
* Attach Konami { ← ← a }
*/
manager.add(attackFireball, [Keyboard.LEFT, Keyboard.LEFT, Keyboard.A]);
/**
* Attach Konami { → → a }
*/
manager.add(attackIceball, [Keyboard.RIGHT, Keyboard.RIGHT, Keyboard.A]);
/**
* Attack Fireball callback handler
*/
function attackFireball() {
console.log('Fireball attack');
}
/**
* Attack Iceball callback handler
*/
function attackIceball() {
console.log('Iceball attack');
}
</script>
</body>
</html>