-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
108 lines (100 loc) · 4.68 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Naval Battles</title>
<link rel="stylesheet" href="styles.css" />
<link rel="icon" href="AzurLaneIconBW.png" />
</head>
<body>
<video loop muted autoplay src="midwayvid.mp4" id="vid"></video>
<main>
<!-- <button onClick="init()" style="display:inline-block;position:fixed;top:20%;left:0;right:0;margin-left:auto;margin-right:auto;z-index:3;"><h1 style="text-align:center;">Naval Battles</h1></button> -->
<header>
<h1 style="display:inline-block;">Naval Battles</h1>
<span id="scenarios" class="shipListWrapper">
<h2>Scenarios</h2>
<ul class="shipList"></ul>
</span>
<span id="carriers" class="shipListWrapper">
<h2>Aircraft Carriers</h2>
<ul class="shipList"></ul>
</span>
<span id="battleships" class="shipListWrapper">
<h2>Battleships</h2>
<ul class="shipList"></ul>
</span>
<span id="cruisers" class="shipListWrapper">
<h2>Cruisers</h2>
<ul class="shipList"></ul>
</span>
<button id="switchTeam" onClick="switchTeam()">Team A</button>
<button id="switchTeamPlayingAs" onClick="switchTeamPlayingAs()">Playing as Team A</button>
<button id="start" onClick="init()">Start</button>
</header>
<section id="teams">
<div>
<h2 id="warning" style="color:red; display:none;">Add ships to both teams</h2>
<h2>Teams</h2>
</div>
<article><h3><input type="text" name="teamAName" id="teamAName" /></h3><ul id="teamA"></ul></article>
<article><h3><input type="text" name="teamBName" id="teamBName" /></h3><ul id="teamB"></ul></article>
</section>
<section>
<h2>Press H for controls when in game.</h2>
<h2>Play Music? <input type="checkbox" name="playMusic" id="playMusic" onclick="toggleMusic()"/></h2>
</section>
</main>
<div style="overflow-x:hidden; overflow-y: hidden;"><canvas></canvas></div>
<div id="help" style="display:none;">
<h1>Help</h1>
<h3>Selecting Ships</h3>
<ul>
<li>Use the Left Mouse Button to select different ships</li>
<li>Clicking on a ship icon at the top of the screen selects that ship and focuses it</li>
</ul>
<h3>Camera Controls</h3>
<ul>
<li>Double clicking LMB or pressing F toggles camera focus on the selected ship</li>
<li>Using the Arrow Keys or moving the mouse near the edge of the screen will move the camera in the desired direction</li>
</ul>
<h3>Ship Movement and Controls</h3>
<ul>
<li>Clicking the Auto-steer button disables auto-steer, allowing you to turn and set speed manually by pressing the below buttons
<ul>
<li>W and S increase and decrease speed setting of selected ship</li>
<li>A and D turn the ship left and right</li></ul>
</li>
<li>Clicking the Auto-fire button disables auto-fire, allowing you to fire guns manually by pressing the fire button and then the target location when the guns are reloaded</li>
</ul>
<h3>Aircraft Camera Controls (To use with focusing)</h3>
<ul>
<li>1 selects the 1st squadron of the selected carrier</li>
<li>2 selects the 2nd, etc.</li>
<li>` returns the selection to the carrier</li>
</ul>
<h3>Other</h3>
<ul>
<li>H toggles this help screen</li>
<li>J hides the GUI</li>
<li>K hides the grid</li>
<li>Press P to pause the game</li>
<li>, - Play music</li>
<li>. - Pause music</li>
<li>/ - Skip track</li>
<li>M - Mute all sound</li>
</ul>
<h3 style="text-align: center; color:crimson;">Press Q to end the game and go to the home screen</h3>
</div>
<div id="pausedscreen" style="top:0; left:0;width:100%; height:100%; background-color: rgba(0,0,0,0.25); z-index:3; position:fixed; display:none; text-align:center;">
<div id="victoryscreen" style="display:none;">
<h1></h1>
</div>
</div>
<h2 id="quitgame" style="display:none;"><strong>Quit game?<br /> Q = Quit, C = Cancel</strong></h2>
<!-- <audio src="mkaliez.mp3" controls /> -->
<!-- <script src="shipTypes.json"></script> -->
<script src="script.js"></script>
</body>
</html>