-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (56 loc) · 2.15 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>
<head>
<title>ASCII-Game</title>
<script src="src/Engine/Core/Math/Vector2D.js" type="text/javascript"></script>
<script src="src/Engine/Core/GameFramework/Objects/Actor.js" type="text/javascript"></script>
<script src="src/Engine/Core/GameFramework/Objects/Pawn.js" type="text/javascript"></script>
<script src="src/Engine/Core/GameFramework/Objects/Character.js" type="text/javascript"></script>
<script src="src/Engine/Core/GameFramework/Objects/Item.js" type="text/javascript"></script>
<script src="src/Engine/Core/GameFramework/World.js" type="text/javascript"></script>
<script src="src/Engine/Core/GameFramework/Inventory.js" type="text/javascript"></script>
<script src="src/Engine/Game/Game.js" type="text/javascript"></script>
<style>
* {padding: 0; }
canvas {background: #eee;}
canvas#inventAndStat{
background: #ddd;
}
canvas#controls{
background: #ddd;
}
ul#gui li ul li {
display:inline;
}
ul#gui li ul{
padding-bottom: 3px;
}
</style>
</head>
<body>
<ul id="gui">
<li>
<ul>
<li><canvas id="map" width="650" height="370"></canvas></li>
<li><canvas id="controls" width="230" height="370"></canvas></li>
</ul>
<ul>
<li><canvas id="inventAndStat" width="650" height="200"></canvas></li>
<li><canvas id="infoBox" width="230" height="200"></canvas></li>
</ul>
</li>
</ul>
<script type="text/javascript">
// main game instance
let GameInstance = new Game();
// declare main loop
function gameMainLoop() {
GameInstance.draw();
GameInstance.update();
requestAnimationFrame(gameMainLoop);
}
// call main loop
gameMainLoop();
</script>
</body>
</html>