<!DOCTYPE html>
<html>
<head>
<title>暴打神经猫- 微信HTML5在线朋友圈游戏</title>
<meta charset="utf-8"/>
<meta name="viewport" content="initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, width=device-width,target-densitydpi=device-dpi"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/createjs.js"></script>
<script type="text/javascript">
var i = new Date().getTime() % 5;
var isDesktop = navigator['userAgent'].match(/(ipad|iphone|ipod|android|windows phone)/i) ? false : true;
var fontunit = isDesktop ? 20 : ((window.innerWidth>window.innerHeight?window.innerHeight:window.innerWidth)/320)*10;
document.write('<style type="text/css">'+
'html,body {font-size:'+(fontunit<30?fontunit:'30')+'px;}'+
(isDesktop?'#welcome,#GameTimeLayer,#GameLayerBG,#GameScoreLayer.SHADE{position: absolute;}':
'#welcome,#GameTimeLayer,#GameLayerBG,#GameScoreLayer.SHADE{position:fixed;}@media screen and (orientation:landscape) {#landscape {display: box; display: -webkit-box; display: -moz-box; display: -ms-flexbox;}}')+
'</style>');
</script>
<style type="text/css">
body {font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif; margin: 0; padding: 0;}
.loading {background-image: url("images/loding.gif");
background-repeat: no-repeat;
background-position: center center;
background-size: auto 60%;
}
.SHADE {top: 0; left:0; width:100%; height: 100%; bottom:0; z-index: 11;}
.BOX-V {box-orient: vertical;-webkit-box-orient: vertical; -moz-box-orient: vertical;-ms-flex-direction:column;}
.BOX-D {box-align: end; box-pack: center -webkit-box-align: end; -webkit-box-pack: center; -ms-flex-align:end; -ms-flex-pack:center;}
.BOX-M {box-align: center;box-pack: center; -webkit-box-align: center; -webkit-box-pack: center; -ms-flex-align:center; -ms-flex-pack:center;}
.BOX-S {display:block; box-flex:1; -webkit-box-flex:1; -moz-box-flex:1;-ms-flex:1;}
.BOX ,.BOX-V,.BOX-D,.BOX-M, .FOOTER{display: box; display: -webkit-box; display: -moz-box; display: -ms-flexbox;}
.BBOX ,.BOX,.APP-STAGE,.INSET-STAGE,.STAGE,.PAGE-STAGE,.PAGE,.PAGE-BOX,.INSET-PAGE,.FOOTER{box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box;}
#welcome { background-color:rgba(0,0,0,.8); text-align: center; font-weight: bold;overflow: hidden;}
.welcome-bg {position:absolute;top:0;left:0;right:0;bottom:0; background: url(images/bing.jpg) center center no-repeat; background-size:100% 100%; opacity: .4;overflow: hidden;}
#GameTimeLayer {top:1em; left: 0; width:100%; text-align: center; color:#f00; font-size: 4em; text-shadow:0 0 3px #fff,0 0 3px #fff,0 0 3px #fff;overflow: hidden;}
#GameLayerBG {top:0;left:0;right:0;bottom:0;overflow:hidden;background:#fff;}
.GameLayer {position:absolute;bottom:0;left:0;}
.block {position:absolute;border-top:1px solid #333; background-repeat: no-repeat; background-position: center;}
.block{background-image:url(images/em.jpg);}
.t1,.t2,.t3,.t4,.t5 { background-size:auto 98%;background-image:url(images/tt0.jpg);}
.t3,.t4 {background-image:url(images/tt1.jpg);}
.t5 {background-image:url(images/tt2.jpg);}
.tt1,.tt2,.tt3,.tt4,.tt5 { background-size:auto 96%;background-image:url(images/jiao.jpg);}
.tt1,.tt2{background-image:url(images/j1.jpg);}
.tt3,.tt4{background-image:url(images/j2.jpg);}
.bt{display:block;padding:20px;background:#999;color:#000;text-decoration:none;margin:25px;}
a.bt{background:#FC0;}
.bl {border-left:1px solid #333;}
@-ms-keyframes flash {
0% { opacity: 1; }
50% { opacity: 0; }
100% { opacity: 1; }
}
@-webkit-keyframes flash {
0% { opacity: 1; }
50% { opacity: 0; }
100% { opacity: 1; }
}
.flash {-webkit-animation: flash .2s 3;animation: flash .2s 3;}
.bad {background-color:#000;background-size:90%;background-image:url(images/bad.jpg); -webkit-animation: flash .2s 3;animation: flash .2s 3;}
* {-webkit-tap-highlight-color: rgba(0,0,0,0);-ms-tap-highlight-color: rgba(0,0,0,0); tap-highlight-color: rgba(0,0,0,0); -ms-user-select: none;}
#GameScoreLayer {background-position:center .5em; background-size: auto 4em; padding-top:3em; font-size:2em; font-weight: bold; color:#fff; text-align: center;overflow: hidden;}
.bgc1 { background-color: #23378B;}
.bgc2 { background-color: #009FE3;}
.bgc3 { background-color: #E42313;}
.bgc4 { background-color: #FCBD1B;}
.bgc5 { background-color: #34002A;}
.share-icon {width:1.7em; background-repeat:no-repeat; background-size: auto 100%;}
#GameScoreLayer-btn .btn,#GameScoreLayer-share .btn {text-align: center;font-size:1.1em; background-color: rgba(0,0,0,.3); height:2em; line-height:2em;}
.btn:active {opacity: 0.2;}
#landscape {display: none;}
#gameBody {position: relative; width: 640px; margin: 0 auto; height: 100%;}
#share-wx {
background: rgba(0,0,0,0.8);
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 10000;
display: none;
}
</style>
</head>
<body>
<script type="text/javascript">
window.shareData = {
"imgUrl": "http://app.46465.com/html5/bdsjm/images/dbsjm.jpg",
"timeLineLink": "http://app.46465.com/html5/bdsjm/",
"tTitle": "暴打神经猫",
"tContent": "朋友圈被神经猫刷屏?快来暴打神经猫!"
};
if (isDesktop)
document.write('<div id="gameBody">');
var body, blockSize, GameLayer = [], GameLayerBG, touchArea = [], GameTimeLayer;
var transform, transitionDuration;
function init (argument) {
showWelcomeLayer();
body = document.getElementById('gameBody') || document.body;
body.style.height = window.innerHeight+'px';
transform = typeof(body.style.webkitTransform) != 'undefined' ? 'webkitTransform' : (typeof(body.style.msTransform) != 'undefined'?'msTransform':'transform');
transitionDuration = transform.replace(/ransform/g, 'ransitionDuration');
GameTimeLayer = document.getElementById('GameTimeLayer');
GameLayer.push( document.getElementById('GameLayer1') );
GameLayer[0].children = GameLayer[0].querySelectorAll('div');
GameLayer.push( document.getElementById( 'GameLayer2' ) );
GameLayer[1].children = GameLayer[1].querySelectorAll('div');
GameLayerBG = document.getElementById( 'GameLayerBG' );
if( GameLayerBG.ontouchstart === null ){
GameLayerBG.ontouchstart = gameTapEvent;
}else{
GameLayerBG.onmousedown = gameTapEvent;
document.getElementById('landscape-text').innerHTML = '点我开始玩耍';
document.getElementById('landscape').onclick = winOpen;
}
gameInit();
window.addEventListener('resize', refreshSize, false);
setTimeout(function(){
var btn = document.getElementById('ready-btn');
btn.className = 'btn';
btn.innerHTML = ' 预备,上!'
btn.style.backgroundColor = '#F00';
btn.onclick = function(){
closeWelcomeLayer();
}
}, 500);
}
function winOpen() {
window.open(location.href+'?r='+Math.random(), 'nWin', 'height=500,width=320,toolbar=no,menubar=no,scrollbars=no');
var opened=window.open('about:blank','_self'); opened.opener=null; opened.close();
}
var refreshSizeTime;
function refreshSize(){
clearTimeout(refreshSizeTime);
refreshSizeTime = setTimeout(_refreshSize, 200);
}
function _refreshSize(){
countBlockSize();
for( var i=0; i<GameLayer.length; i++ ){
var box = GameLayer[i];
for( var j=0; j<box.children.length; j++){
var r = box.children[j],
rstyle = r.style;
rstyle.left = (j%4)*blockSize+'px';
rstyle.bottom = Math.floor(j/4)*blockSize+'px';
rstyle.width = blockSize+'px';
rstyle.height = blockSize+'px';
}
}
var f, a;
if( GameLayer[0].y > GameLay