-
Notifications
You must be signed in to change notification settings - Fork 172
/
index.html
365 lines (286 loc) · 12.9 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>合成大西瓜</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1" />
<!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
<!-- force webkit on 360 -->
<meta name="renderer" content="webkit" />
<meta name="force-rendering" content="webkit" />
<!-- force edge on IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="msapplication-tap-highlight" content="no">
<!-- force full screen on some browser -->
<meta name="full-screen" content="yes" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<!-- force screen orientation on some browser -->
<meta name="screen-orientation" content="" />
<meta name="x5-orientation" content="">
<!--fix fireball/issues/3568 -->
<!--<meta name="browsermode" content="application">-->
<meta name="x5-page-mode" content="app">
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<!-- <script>
pushHistory();
window.addEventListener("popstate", function(e) {
}, false);
function pushHistory() {
var state = {
title: "",
url: window.location.href
};
window.history.pushState(state, state.title, state.url);
}
</script> -->
<!-- <script type="text/javascript">
var ua = navigator.userAgent.toLowerCase();//获取判断用的对象
//判断是否是微信下访问
if (ua.match(/MicroMessenger/i) == "micromessenger") {
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
location.href="https://mp.weixin.qq.com/s/wAqlH99Quy7BQNiCW32iAg";
}
}
</script> -->
<link rel="stylesheet" type="text/css" href="style-mobile.css" />
<script src="layer/jquery.min.js"></script>
<script src="layer/layer.min.js"></script>
<link href="layer/layer.css" rel="stylesheet">
</head>
<body style="margin: 0; background: #ddd;" align="center">
<div style="align:center;display: none"><img src="res/share.jpg" width="10%" /></div>
<div id="canvasDiv" style="width:100%;height:100%;">
<canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
<div id="block-Box" style="display:block;width:100%;height:100%;"></div>
</div>
<div id="adContainer" style="display:none;position: absolute;top:0px;left: 0px;width:100%;height:100%;z-index:999;"></div>
<div id="loadingText" style="width:100%;display: none;text-align:center;position:absolute;top:45%;z-index:2;font-size:20px;color:#f99f0a">
loading......0%
</div>
<div id="splash">
<!-- <div class="progress-bar stripes"> -->
<!-- <span style="width: 0%"></span> -->
<!-- </div> -->
</div>
<div id="loadingImg" style="top:45%;width: 100%;position:absolute; ">
<img src="res/loading.gif" width="7%" height="7%" />
</div>
<!-- 判断浏览器是否屏蔽广告 -->
<!-- <script src="http://demo.jb51.net/js/2015/adview_pic_cpc_cpm_cpa_guanggao_gg_ads_300x250.js" type="text/javascript"></script> -->
<!-- <script type="text/javascript">
var killAdT = typeof(killads);
<!-- if (typeof(killads)=='undefined'){ -->
<!-- alert('广告被过滤'); -->
<!-- } -->
<!-- </script> -->
-->
<!--<div align="center" style="font-size: 10px;color: dimgrey">advertisement</div>-->
<!-- <script type="text/javascript" src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script> -->
<script type="text/javascript" src="ads.js"></script>
<script src="src/settings.js" charset="utf-8"></script>
<script type="text/javascript">
var preloader;
var adCompleteFlag = false;
var resCompleteFlag = false;
var adEndComplete = false;
var resEndComplete = false;
judgeLanTitle();
function judgeLanTitle() {
// console.log("window.navigator.language",window.navigator.language);
if (window.navigator.language == "zh-CN" || window.navigator.language == "zh-cn") {
document.title = "小游戏:合成大西瓜";
} else if (window.navigator.language == "zh-TW") {
document.title = "小遊戲:合成大西瓜";
} else if (window.navigator.language == "zh-HK") {
document.title = "小遊戲:合成大西瓜";
} else if (window.navigator.language == "ko-KR") {
document.title = "작은 놀이:큰 수박 을 합성 하 다";
} else if (window.navigator.language == "ja-JP") {
document.title = "ミニゲーム:合成スイカ";
} else if (window.navigator.language == "th-TH") {
document.title = "เกมเล็กๆ:แตงโมสังเคราะห์";
} else {
document.title = "Little game:Synthetic watermelon";
}
}
if(true){
window.difficulty = [0, 5];
multiplescore = 1;
function changeDifficulty(ele, diff) {
$('[name=difficulty]').css('background-color', '');
$(ele).css('background-color', '#1E9FFF');
window.difficulty = diff;
}
function multipleScore(ele, diff) {
$('[name=fanbei]').css('background-color', '');
$(ele).css('background-color', '#1E9FFF');
multiplescore = diff;
}
}
layer.open({
type: 1
, title: false //不显示标题栏
, closeBtn: false
, area: '300px;'
, shade: 0.8
, id: 'layer2' //设定一个id,防止重复弹出
, resize: false
, btn: ['开始游戏']
, btnAlign: 'c'
, shadeClose: true //开启遮罩关闭
, moveType: 1 //拖拽模式,0或者1
, content:
'<div style="padding: 10px;text-align:center; line-height: 5px; background-color: #393D49; color: #fff;"><h4>模式选择</h4>'
+ '<button name="difficulty" onclick="changeDifficulty(this,[0,10])">随缘Play</button><br>'
+ '<button name="difficulty" onclick="changeDifficulty(this,[0,0])">圣雄肝帝</button><br>'
+ '<button name="difficulty" style="background-color:#1E9FFF" onclick="changeDifficulty(this,[0,5])">原汁原味</button><br>'
+ '<button name="difficulty" onclick="changeDifficulty(this,[5,5])">作弊模式</button><br>'
+ '<button name="difficulty" onclick="changeDifficulty(this,[2,7])">去除小瓜</button><br>'
+ '<button name="difficulty" onclick="changeDifficulty(this,[9,9])">暴力吃瓜</button><br>'
+ '</div>'
+ '<div style="padding: 10px;text-align:center; line-height: 5px; background-color: #393D49; color: #fff;"><h4>分数选择</h4>'
+ '<button name="fanbei" onclick="multipleScore(this,2)">两倍暴击</button><br>'
+ '<button name="fanbei" onclick="multipleScore(this,5)">五倍暴击</button><br>'
+ '<button name="fanbei" onclick="multipleScore(this,10)">十倍暴击</button><br>'
+ '<button name="fanbei" onclick="multipleScore(this,100)">百倍暴击</button><br>'
+ '<button name="fanbei" onclick="multipleScore(this,1000)">千倍暴击</button><br>'
+ '<button name="fanbei" onclick="multipleScore(this,10000)">万倍暴击</button><br>'
+ '<button name="fanbei" onclick="multipleScore(this,100000)">十万伏特</button><br>'
+ '</div>',
success: function (layero) {
}
});
var loadintT = document.getElementById("loadingText");
var loadintGif = document.getElementById("loadingImg")
setTimeout(function() {
loadintGif.remove();
loadintT.style.display = ""
updateLabView(0.1);
}, 1 * 1000)
window.timer = null;
window.tempSeconds = 1;
window.loadData = {};
loadData.completedCount = 0;
loadData.totalCount = 0;
onload();
function onload() {
var winHeight = document.documentElement.clientHeight;
document.getElementById("canvasDiv").style.height = winHeight + "px";
};
window.onload = function() {
document.getElementById("block-Box").style.display = "none";
}
function updateLabView(t) {
if (timer != null) {
clearInterval(timer);
}
timer = setInterval(function() {
tempSeconds++;
actualTotal();
var loadintT = document.getElementById("loadingText")
if (!loadintT) {
return;
}
loadintT.innerHTML = 'loading......' + parseInt(tempSeconds) + '%';
switch (tempSeconds) {
case 20:
updateLabView(0.2);
break;
case 40:
updateLabView(0.3);
break;
case 60:
updateLabView(0.4);
break;
case 96:
updateLabView(5);
break;
case 97:
updateLabView(10);
break;
case 98:
updateLabView(50);
break;
case 99:
updateLabView(100);
break;
default:
if (tempSeconds >= 80 && tempSeconds < 96) {
updateLabView(t + 0.1);
}
break;
}
if (tempSeconds > 100) {
clearInterval(timer);
tempSeconds = 100
loadintT.innerHTML = 'loading......' + parseInt(tempSeconds) + '%';
}
}, t * 1000);
}
function actualTotal() {
var percent = parseInt(100 * loadData.completedCount / loadData.totalCount);
if (percent > tempSeconds && loadData.totalCount > 1) {
tempSeconds = percent;
}
}
/*setTimeout("ShowBannerAD()","2000");*/
</script>
<script src="src/settings.js" charset="utf-8"></script>
<script src="main.js" charset="utf-8"></script>
<!-- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> -->
<!-- 暴力扣篮 -->
<!-- <ins class="adsbygoogle"
style="position:absolute;border-top:5px #f0f0f1 solid;background:#f0f0f1;bottom:0px;z-index:1000;display:inline-block;min-width:320px;max-width:970px;width:100%;height:60px"
data-ad-client="ca-pub-3932234672445376"
data-ad-slot="7048809290"
></ins>
<script>
var ads = document.getElementsByClassName('adsbygoogle')[0];
if (document.body.clientHeight > 700){
ads.style.height = 80+'px';
}else{
ads.style.height = 60+'px';
}
</script>
<script>
function ShowBannerAD(){
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script> -->
<!-- <script async data-ad-client="ca-pub-3932234672445376" data-ad-channel="7171445254" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"> -->
</script>
<script>
window.adsbygoogle = window.adsbygoogle || [];
const adBreak = function(o) {
adsbygoogle.push(o);
}
</script>
<script type="text/javascript">
(function() {
// open web debugger console
if (typeof VConsole !== 'undefined') {
window.vConsole = new VConsole();
}
var splash = document.getElementById('splash');
splash.style.display = 'block';
console.log("indexlTextTTTT");
var cocos2d = document.createElement('script');
cocos2d.async = true;
cocos2d.src = window._CCSettings.debug ? 'cocos2d-js.js' : 'cocos2d-js-min.js';
var engineLoaded = function() {
document.body.removeChild(cocos2d);
cocos2d.removeEventListener('load', engineLoaded, false);
window.boot();
};
cocos2d.addEventListener('load', engineLoaded, false);
document.body.appendChild(cocos2d);
})();
</script>
</body>
</html>