-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
154 lines (132 loc) · 4.35 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<HTML>
<head>
<meta charset="utf-8"/>
<title> Races 1.0.0 </title>
<link rel="stylesheet" href="css/main.css">
<script src="js/libs/playground-base.js"></script>
<script src="js/libs/raphael.js"></script>
<script src="js/maps.js"></script>
<script src="js/engineMenu.js"></script>
<script src="js/engineMain.js"></script>
<head/>
<body>
<table id = "table_menu">
<tr>
<td colspan="3">
<input type="text" id = "input_name" maxlength="20" autofocus tabindex="1"/>
</td>
<td colspan="3" rowspan="4" id="td_controls" >
<div>
Управление(стрелками): <br/>
UP - увеличить скорость <br/>
DOWN - уменьшить скорость </br>
RAIGHT - повернуть направо </br>
LEFT - повернуть налево <br/><br/>
ESCAPE - вызвать меню игры <br/><br/><br/>
оттестировано под chromium 49
</div>
</td>
</tr>
<tr>
<td>
<img src="img/blue.png" class="img_racer"/>
</td>
<td>
<img src="img/red.png" class="img_racer"/>
</td>
<td>
<img src="img/green.png" class="img_racer"/>
</td>
</tr>
<tr>
<td>
<img src="img/turquoise.png" class="img_racer"/>
</td>
<td>
<img src="img/yellow.png" class="img_racer"/>
</td>
<td>
<img src="img/black.png" class="img_racer"/>
</td>
</tr>
<tr>
<td colspan="3" id="td_maps_collection">
<div>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<input type="button" id="button_sounds" value="Звук выкл."/>
</td>
<td colspan="1">
<input type="button" id="button_start" tabindex="2" value="Играть!">
</td>
<td colspan="3" rowspan="1" class = "td_title" id = "td_chromium">
<a href="http://playgroundjs.com/"> play-ground.js</a> <br/>
<a href="http://raphaeljs.com/"> raphael.js</a> <br/>
</td>
</tr>
</table>
<table class="table_maps">
<tr>
<td rowspan="2" class="choise_maps_name">
</td>
<td class="choise_maps_user">
</td>
</tr>
</table>
<div id = "div_menu">
<input type="button" tabindex="1" value="Рестарт"/>
<input type="button" tabindex="2" value="Выйти в меню"/>
<input type="button" tabindex="3" value="Продолжить"/>
</div>
<div id="div_popup">
</div>
<div id="div_popup_finish">
<div></div>
<div>
<span></span><br/><br/>
<input type="button" tabindex="1" value="Выйти в меню"/>
<input type="button" tabindex="2" value="Рестарт"/>
</div>
</div>
<script>
var params = {};
var ENGINE = {};
ENGINE.main = main;
ENGINE.menu = menu;
// main Application of the game
var app = new PLAYGROUND.Application({
//there is loading resorce
create: function(){
var select_music;
this.loadSounds('fly_main', 'fly_rival_1', 'fly_rival_2', 'hit', 'wind', 'bip');
select_music = Math.floor(Math.random() * 2);
if (select_music > 0){
this.loadSounds('alien_swamp');
this.sound.alias('music', 'alien_swamp', 1.0, 1.0);
} else {
this.loadSounds('Games_Begin');
this.sound.alias('music', 'Games_Begin', 1.0, 1.0);
}
this._sizes_ = {
w: window.innerWidth,
h: window.innerHeight,
};
this._svg_ = Raphael(0, 0, this._sizes_.w, this._sizes_.h);
},
// call after loading
ready: function(){
this.setState(ENGINE.menu);
},
resize: function(){
this._sizes_.w = window.innerWidth;
this._sizes_.h = window.innerHeight;
this._svg_.canvas.style.width = this._svg_.canvas.width = this._svg_.width = this._sizes_.w;
this._svg_.canvas.style.height = this._svg_.canvas.height = this._svg_.height = this._sizes_.h;
},
});
</script>
</body>
</html>