-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
75 lines (54 loc) · 2.39 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
<!doctype html>
<html lang="en-us">
<head>
<meta charset="iso-8859-1" />
<title>~TWISTED CURVES~</title>
<link href='style.css' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" href="favicon.ico"/>
<script type="text/javascript" src="js/phaser.min.js"></script>
<!--<script type="text/javascript" src="js/phaser.js"></script>-->
<script type="text/javascript" src="src/states/Boot.js"></script>
<script type="text/javascript" src="src/states/PreloadMenu.js"></script>
<script type="text/javascript" src="src/states/Menu.js"></script>
<script type="text/javascript" src="src/states/PreloadGame.js"></script>
<script type="text/javascript" src="src/states/SinglePlayer.js"></script>
<script type="text/javascript" src="src/states/GameManager.js"></script>
<script type="text/javascript" src="src/states/Stats.js"></script>
<script type="text/javascript" src="src/modes/Normal.js"></script>
<script type="text/javascript" src="src/entities/Player.js"></script>
<script type="text/javascript" src="src/entities/PowerUp.js"></script>
<script type="text/javascript" src="src/Common.js"></script>
</head>
<body>
<script type="text/javascript">
(function() {
baseW = 1366;
baseH = 768;
baseRatio = 1366/768;
baseArea = 1024*1024;
var winW = window.innerWidth;
var winH = window.innerHeight;
var winRatio = winW/winH;
// Determine if the we are in a mobile environment.
// I think this is a poor whay to do it.
mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Silk/i.test(navigator.userAgent);
//mobile = true;
var height = Math.round(Math.sqrt(baseArea/winRatio));
var width = Math.round(winRatio*height);
var game = new Phaser.Game(width, height, Phaser.AUTO, "");
// determine the device platform : could be Android, iOS, windows phone or desktop
// This does not work !!!
//mobile = Phaser.Device.android || game.device.windowsPhone || game.device.iOS;
console.log("Mobile Platform?: " + mobile);
game.state.add("Boot",boot);
game.state.add("PreloadMenu",preloadMenu);
game.state.add("Menu",menu);
game.state.add("Stats",stats);
game.state.add("SinglePlayer",singlePlayer);
game.state.add("PreloadGame",preloadGame);
game.state.add("GameMananger",gameMananger);
game.state.start("Boot");
})();
</script>
</body>
</html>