-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
42 lines (42 loc) · 1.21 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
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html lang="en">
<head>
<meta charset="UTF-8">
<title>FlappyBird</title>
<style>
html,body{
margin: 0;
padding: 0;
overflow: hidden;
}
#canvas{
display: block;
margin: 0 auto;
background-color: skyblue;
}
</style>
</head>
<body>
<canvas id="canvas" width="900rem" height="600rem" style="border: 1px solid #000;"></canvas>
<script src="js/simple-inheritence.js"></script>
<script src="js/underscore-min.js"></script>
<script src="js/flexible.js"></script>
<script src="js/Game.js"></script>
<script src="js/FpsUtil.js"></script>
<script src="js/AjaxUtil.js"></script>
<script src="js/Background.js"></script>
<script src="js/Pipe.js"></script>
<script src="js/Bird.js"></script>
<script>
//实例化游戏对象
var game = new Game({
canvasId: 'canvas',
//传入-1表示当前设备和环境所能达到的最大fps,一般不用
fps: 60
});
// 全屏
game.canvas.width = window.innerWidth;
game.canvas.height = window.innerHeight;
</script>
</body>
</html>