-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
77 lines (74 loc) · 4.29 KB
/
main.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
<!DOCTYPE html>
<html ng-app="runningBob">
<head>
<link rel="stylesheet" href="vendors/bootstrap-3.3.6-dist/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="resources/css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body ng-controller="GameController as game" ng-keypress="game.keyPress($eventh)">
<nav class="navbar navbar-inverse" ng-controller="NavbarController as navbar">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">Ozon</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li ng-class="{active: navbar.isSelected(1)}"><a href="?level=1" ng-click="navbar.selectLevel(1)">Level 1</a></li>
<li ng-class="{active: navbar.isSelected(2)}"><a href="?level=2" ng-click="navbar.selectLevel(2)">Level 2</a></li>
<li ng-class="{active: navbar.isSelected(3)}"><a href="?level=3" ng-click="navbar.selectLevel(3)">Level 3</a></li>
</ul>
</div>
</div>
</nav>
<div id="gameDiv" class="container fill">
<div class="row">
<div id="buttonsDiv" class="col-lg-2">
<button type="button" class="btn btn-default btn-block launch-disabled" ng-click="game.horizontal()">Horizontal Platform</button>
<button type="button" class="btn btn-default btn-block launch-disabled" ng-click="game.vertical()">Vertical Platform</button>
<button type="button" class="btn btn-default btn-block launch-disabled" ng-click="game.tiltedDown()">Tilted Down</button>
<button type="button" class="btn btn-default btn-block launch-disabled" ng-click="game.tiltedUp()">Tilted Up</button>
<hr>
<button type="button" class="btn btn-default btn-block launch-disabled" ng-click="game.undo()"">Undo</button>
<button type="button" class="btn btn-default btn-block" ng-click="game.reset()">Reset</button>
<button id="launchButton" type="button" class="btn btn-default btn-block btn-success" ng-click="game.launch()">Launch !</button>
<button id="solutionButton" type="button" class="btn btn-default btn-block bottomaligned launch-disabled" ng-click="game.showSolution()">Show solution</button>
</div>
<div id="canvasDiv" class="col-lg-10">
<div id="ballIsOutAlert" class="alert alert-warning alert-dismissible" role="alert" hidden>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>The Ball is out</strong>
</div>
<canvas id="canvas"></canvas>
</div>
</div>
<!-- Win Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">You won !</h4>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-block" onclick="location.reload();">Restart</button>
<button type="button" class="btn btn-primary btn-block" onclick="goToNextLevel();">Next Level</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="vendors/angular.min.js"></script>
<script type="text/javascript" src="vendors/jquery.js"></script>
<script type="text/javascript" src="vendors/jquery.playSound.js"></script>
<script type="text/javascript" src="vendors/bootstrap-3.3.6-dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="vendors/box2dweb-2.1a.4/Box2D.js"></script>
<script type="text/javascript" src="resources/js/levels.js"></script>
<script type="text/javascript" src="resources/js/index.js"></script>
</body>
</html>