-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmultiplay.html
92 lines (89 loc) · 3.29 KB
/
multiplay.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
<!doctype html>
{% autoescape true %}
<html ng-app="mc">
<head>
<title>Multiplay - Codingcraft</title>
<meta charset="utf-8">
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="css/normalize.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
</head>
<body ng-controller="MultiplayController as game" ng-cloak>
{% raw %}
<div id="container">
<div class="crosshair" ng-hide="!game.hideCover">
<img src="images/crosshair.png"/>
</div>
<div class="blocks">
<div class="blocks-center">
<span class="block" ng-repeat="icon in game.icons" ng-class="{selected: game.currentMaterial == $index}">
<img ng-src="/textures/{{icon}}.png">
<span class="block-name">{{icon}}</span>
</span>
</div>
</div>
</div>
<div class="hud">
<div ng-repeat="chat in game.chats" ng-style="chat.style">
{{chat.name}}: {{chat.text}}
</div>
</div>
{% endraw %}
<div class="cover" ng-hide="game.hideCover"></div>
<div class="help-container" ng-hide="game.hideCover">
{% include "help.html" %}
</div>
<div class="status-container" ng-hide="!game.hideCover">
{% raw %}
<div ng-repeat="(name, value) in game.status">
{{name}}: {{value}}
</div>
{% endraw %}
</div>
<div class="menu-container" ng-hide="game.hideCover">
<div class="user-container">
{{username}}
</div>
<div class="menu">
<div class="title">Status</div>
<div class="section">
{% raw %}
<span ng-hide="game.freezed">You are unfreezed. You can add or remove blocks. But, only owner can save the changes you make.</span>
<span ng-show="game.freezed">You are freezed. You cannot add or remove blocks.</span>
{% endraw %}
</div>
{% if is_owner %}
<div class="title">Owner menu</div>
<div class="section">
<span class="button-container">
<button class="button secondary" ng-click="game.saveAndSyncMap()">Save and sync map</button>
</span>
</div>
<div class="section">
<span class="button-container">
<button class="button secondary" ng-click="game.freezePlayers(true)">Freeze other players</button>
</span>
<span class="button-container">
<button class="button secondary" ng-click="game.freezePlayers(false)">Unfreeze other players</button>
</span>
</div>
{% endif %}
</div>
</div>
<aside class="topbar hide" id="topbar"></aside>
<script type="text/javascript" src="/_ah/channel/jsapi"></script>
<script type="text/javascript">
window.MC_initdata = {
key: '{{key}}',
token: '{{channel_token}}',
user_id: '{{user_id}}',
map_owner_id: '{{map_owner_id}}',
channel: new goog.appengine.Channel('{{channel_token}}')
};
</script>
<script src="js/multiplay_bundle.js"></script>
</body>
</html>
{% endautoescape %}