-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
48 lines (41 loc) · 1.04 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
*{
margin: 0;
padding: 0;
}
canvas{
margin: 0 auto;
display: block;
background-color: skyblue;
}
</style>
</head>
<body>
<canvas id="canvas" width="900" height="600" style="border: 1px solid #000;"></canvas>
<script src='js/simple-Inheritance.js'></script>
<script src="js/Game.js"></script>
<script src="js/FrameUtil.js"></script>
<script src="js/StaticSourceUtil.js"></script>
<script src="js/Background.js"></script>
<script src="js/underscore-min.js"></script>
<script src="js/Pipe.js"></script>
<script src="js/Bird.js"></script>
<script>
//实例化中介类
var game = new Game({
fps:60,
canvasId:'canvas'
});
//运行游戏
// game.run();
//调整画布宽高
game.canvas.width = document.documentElement.clientWidth;
game.canvas.height = document.documentElement.clientHeight;
</script>
</body>
</html>