-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathindex.html
111 lines (98 loc) · 3.01 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<!--
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,600" />
<link rel="stylesheet" href="boatload-scene.css" />
</head>
<body>
<div id="module-boatload">
<div class="bg">
<div class="river"></div>
</div>
<div class="view">
<div class="background">
<div class="trees trees--left"></div>
<div class="trees trees--top"></div>
<div class="trees trees--bottom"></div>
<div class="trees trees--right"></div>
</div>
<div class="player-rails"></div>
<div class="player">
<div class="player-crossbow"></div>
<div class="player-elf"></div>
<div class="player-rope player-rope--left"></div>
<div class="player-rope player-rope--right"></div>
</div>
<div class="splash hidden">
<div class="splash--1"></div>
<div class="splash--2"></div>
<div class="splash--3"></div>
<div class="splash--4"></div>
</div>
<div class="icebergs"></div>
<div class="bubbles"></div>
<div class="boats"></div>
<div class="presents"></div>
<div class="score-sign hidden"></div>
</div>
<div class="gui">
<div class="levelup"></div>
<div class="levelup--number"></div>
</div>
</div>
<script src="../../node_modules/jquery/dist/jquery.min.js"></script>
<script type="module">
import api from '../../src/scene/api.js';
import Game from './:closure.js';
api.preload.sounds('bl_load_sounds');
api.preload.images(
'img/boat1.svg',
'img/boat2.svg',
'img/boat3.svg',
'img/iceberg1.svg',
'img/iceberg2.svg',
'img/iceberg3.svg',
'img/iceberg4.svg',
'img/iceberg5.svg',
'img/iceberg6.svg',
'img/logo.svg',
'img/player-crossbow.svg',
'img/player-elf.svg',
'img/player-ropes.svg',
'img/present.svg',
'img/rail.png',
'img/trees-bottom.svg',
'img/trees-left.svg',
'img/trees-right.svg',
'img/trees-top.svg',
);
const game = new Game(document.getElementById('module-boatload'));
api.addEventListener('pause', (ev) => game.pause());
api.addEventListener('resume', (ev) => game.resume());
api.addEventListener('restart', (ev) => game.restart());
api.config({
pause: true,
orientation: 'landscape',
sound: [],
});
api.ready(() => {
game.start();
});
</script>
</body>
</html>