-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tank.html
109 lines (108 loc) · 4.85 KB
/
Tank.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
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Tank!</title>
<link rel="stylesheet" href="Tank/app.css?!" />
<script src="player_api.js"></script>
<!-- <script src="greensocks/TweenMax.min.js"></script>
<script src="greensocks/plugins/ColorPropsPlugin.min.js"></script> -->
<script src="Tank/pixi.min.js"></script>
<script src="Tank/app.js??!!!!!!!!!!"></script>
</head>
<body>
<img id="texture" src="Tank/sprite.png?" onload="DOM.onTextureLoaded()"/>
<section id="main">
<canvas id="field"></canvas>
<figure id="tank0panel" class="action-panel hover-expand">
<button class="hover-expand-initial initial-button">坦克0<br />指令</button>
<figure class="hover-expand-extra">
<div class="move-on-hover up hover-expand">
<button class="hover-expand-initial">上</button>
<div class="hover-expand-extra">
<button class="move-on-hover semi-left" onclick="game.submitAction(0, Action.Up)">移</button>
<button class="move-on-hover semi-right" onclick="game.submitAction(0, Action.UpShoot)">射</button>
</div>
</div>
<div class="move-on-hover right hover-expand">
<button class="hover-expand-initial">右</button>
<div class="hover-expand-extra">
<button class="move-on-hover semi-up" onclick="game.submitAction(0, Action.Right)">移</button>
<button class="move-on-hover semi-down" onclick="game.submitAction(0, Action.RightShoot)">射</button>
</div>
</div>
<div class="move-on-hover down hover-expand">
<button class="hover-expand-initial">下</button>
<div class="hover-expand-extra">
<button class="move-on-hover semi-left" onclick="game.submitAction(0, Action.Down)">移</button>
<button class="move-on-hover semi-right" onclick="game.submitAction(0, Action.DownShoot)">射</button>
</div>
</div>
<div class="move-on-hover left hover-expand">
<button class="hover-expand-initial">左</button>
<div class="hover-expand-extra">
<button class="move-on-hover semi-up" onclick="game.submitAction(0, Action.Left)">移</button>
<button class="move-on-hover semi-down" onclick="game.submitAction(0, Action.LeftShoot)">射</button>
</div>
</div>
<button class="center" onclick="game.submitAction(0, Action.Stay)">止</button>
</figure>
</figure>
<figure id="tank1panel" class="action-panel hover-expand">
<button class="hover-expand-initial initial-button">坦克1<br />指令</button>
<figure class="hover-expand-extra">
<div class="move-on-hover up hover-expand">
<button class="hover-expand-initial">上</button>
<div class="hover-expand-extra">
<button class="move-on-hover semi-left" onclick="game.submitAction(1, Action.Up)">移</button>
<button class="move-on-hover semi-right" onclick="game.submitAction(1, Action.UpShoot)">射</button>
</div>
</div>
<div class="move-on-hover right hover-expand">
<button class="hover-expand-initial">右</button>
<div class="hover-expand-extra">
<button class="move-on-hover semi-up" onclick="game.submitAction(1, Action.Right)">移</button>
<button class="move-on-hover semi-down" onclick="game.submitAction(1, Action.RightShoot)">射</button>
</div>
</div>
<div class="move-on-hover down hover-expand">
<button class="hover-expand-initial">下</button>
<div class="hover-expand-extra">
<button class="move-on-hover semi-left" onclick="game.submitAction(1, Action.Down)">移</button>
<button class="move-on-hover semi-right" onclick="game.submitAction(1, Action.DownShoot)">射</button>
</div>
</div>
<div class="move-on-hover left hover-expand">
<button class="hover-expand-initial">左</button>
<div class="hover-expand-extra">
<button class="move-on-hover semi-up" onclick="game.submitAction(1, Action.Left)">移</button>
<button class="move-on-hover semi-down" onclick="game.submitAction(1, Action.LeftShoot)">射</button>
</div>
</div>
<button class="center" onclick="game.submitAction(1, Action.Stay)">止</button>
</figure>
</figure>
<figure id="result">
<header id="resultTitle"></header>
<p id="resultMessage"></p>
</figure>
<figure class="player-data player-0" id="playerData0">
<img id="avatar0" />
<p class="name" id="playerName0"></p>
</figure>
<figure class="player-data player-1" id="playerData1">
<img id="avatar1" />
<p class="name" id="playerName1"></p>
</figure>
</section>
<a id="soundEnabled" onclick="DOM.toggleSound()">
音
<figure id="soundEnabledCross"></figure>
</a>
<audio id="shootSound" src="Tank/shoot.wav"></audio>
<audio id="victorySound" src="Tank/victory.wav"></audio>
<audio id="destroySound" src="Tank/destroy.wav"></audio>
<audio id="destroyLargeSound" src="Tank/destroy-large.wav"></audio>
<audio id="selectSound" src="Tank/select.wav"></audio>
</body>
</html>