-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
62 lines (52 loc) · 1.97 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>XiaoXiaoLe</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="res/index.css" />
</head>
<body>
<div class="main">
<div class="score">
<button id="js-start">start</button>
<button id="js-hint">hint</button>
<button id="js-chint">close hint</button>
<div class="score-num">score:<span id="js-score-num">0</span></div>
<div class="score-time">time left:<span id="js-time-down">00:00</span></div>
</div>
<div class="game-container">
<canvas id="js-game" width="300" height="250" class="gamecanvas"></canvas>
</div>
</div>
<script src="res/zepto.min.1.1.6.js"></script>
<script src="res/easeljs-0.8.2.min.js"></script>
<script src="res/tweenjs-0.6.2.min.js"></script>
<script src="res/hammer.min.js"></script>
<script src="xiaoxiaole.js"></script>
<script type="text/javascript">
var xxl = new XiaoXiaoLe("js-game", "img",{
col:6, //6 columns
row:5, //5 rows
},function (score) { //score changed calback
$("#js-score-num").text(score)
}, function (score) { //game end calback
alert("gameover!!,You get " + score + " points");
}, function (time) {
$("#js-time-down").text(time)
});
$("#js-start").click(function () {
xxl.start();
})
$("#js-hint").click(function () {
xxl.hint();
})
$("#js-chint").click(function () {
xxl.closeHint();
})
</script>
</body>
</html>