forked from bencao/fc_tank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
93 lines (93 loc) · 3.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
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>FC Tank - a coffeescript rewritten of classic 90 tank on Nintendo Family Computer</title>
<script type="text/javascript" src="js/coffeescript-v1.6.2.min.js"></script>
<script type='text/javascript' src='js/jquery-v1.9.1.min.js'></script>
<script type='text/javascript' src='js/lodash-v1.2.1.min.js'></script>
<script type='text/javascript' src="js/kinetic-v4.5.1.min.js"></script>
<script type='text/javascript' src="js/howler-v1.1.5.min.js"></script>
<style type='text/css'>
#tank_sprite { display: none; }
#canvas {
background: #000;
width: 600px;
height: 520px;
}
#tv_wrapper {
width: 600px;
height: 520px;
padding: 192px 363px 210px 237px;
background: #666 url('image/tv_bg.jpg');
}
body { background: #999; }
strong { font-weight: bold; }
</style>
<script type="text/coffeescript">
loadCoffee = (files) ->
$head = $ "head"
compile_and_add = (content) ->
compiled = CoffeeScript.compile content, {bare: on}
$("<script />").attr("type", "text/javascript").html(compiled).appendTo $head
load = (file) ->
$.ajax {
url: file,
success: compile_and_add,
dataType: 'text'
async: false
}
load file for file in files
loadCoffee [
"src/constant.coffee",
"src/engine/data_structures.coffee",
"src/engine/sound.coffee",
"src/engine/keyboard.coffee",
"src/engine/scene.coffee",
"src/engine/view.coffee",
"src/map/point.coffee",
"src/map/map_area_2d.coffee",
"src/map/map_area_2d_vertex.coffee",
"src/map/map_2d.coffee",
"src/map/map_unit_2d.coffee",
"src/map/movable_map_unit_2d.coffee",
"src/map/terrains.coffee",
"src/map/tiled_map_builder.coffee",
"src/objects/tanks.coffee",
"src/objects/missile.coffee",
"src/objects/gifts.coffee",
"src/objects/commanders.coffee",
"src/scenes/welcome_scene.coffee",
"src/scenes/stage_scene.coffee",
"src/scenes/report_scene.coffee",
"src/scenes/battle_field_scene.coffee",
"src/views/welcome_view.coffee",
"src/views/stage_view.coffee",
"src/views/battle_field_view.coffee",
"src/views/report_view.coffee",
"src/game.coffee"
"src/bootstrap.coffee"
]
</script>
</head>
<body>
<img id="tank_sprite" alt="tanks" width="400" height="360" src="image/tanks.png" />
<div id="tv_wrapper">
<div id="canvas"></div>
</div>
<div id="game_instructions">
<dl class="p1">
<dt>P1 Control</dt>
<dd>Press keyboard <strong>UP, DOWN, LEFT, RIGHT</strong> to move</dd>
<dd>Press keyboard <strong>Z</strong> to fire</dd>
<dd>Press keyboard <strong>SPACE</strong> to toggle 1 user or 2 users mode</dd>
<dd>Press keyboard <strong>ENTER</strong> to start game or toggle game start/pause</dd>
</dl>
<dl class="p2">
<dt>P2 Control</dt>
<dd>Press keyboard <strong>W, S, A, D</strong> to move</dd>
<dd>Press keyboard <strong>J</strong> to fire</dd>
</dl>
</div>
</body>
</html>