123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>打破皮纳塔</title>
- <meta name="keywords" content="打破皮纳塔,打破皮纳塔html5游戏" />
- <meta name="description" content="打破皮纳塔html5游戏,打破皮纳塔手机在线游戏" />
- <link rel="apple-touch-icon" href="icon.png" />
- <link rel="shortcut icon" href="icon.png" />
- <link rel="icon" href="icon.png" />
- <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
- <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
- <script type="text/javascript" src="./lib/soundjs.min.js"></script>
- <script type="text/javascript" src="./Pinata.js"></script>
- <script type="text/javascript">
- function HTML5API_levelStarted() { window.HTML5API && HTML5API.levelStarted && HTML5API.levelStarted(); }
- function HTML5API_levelEnded() { window.HTML5API && HTML5API.levelEnded && HTML5API.levelEnded(); }
- function HTML5API_preloaderStarted() { window.HTML5API && HTML5API.preloaderStarted && HTML5API.preloaderStarted(); }
- function HTML5API_preloaderEnded() { window.HTML5API && HTML5API.preloaderEnded && HTML5API.preloaderEnded(); }
- function HTML5API_showStartButton() { return window.HTML5API && HTML5API.showStartButton && HTML5API.showStartButton(); }
- function HTML5API_getUserId() { if(window.HTML5API && HTML5API.getUserId) return HTML5API.getUserId(); }
- function HTML5API_isAdPlaying() { if(window.HTML5API && HTML5API.isAdPlaying) return HTML5API.isAdPlaying(); }
- function HTML5API_onAdStart(func) { return window.HTML5API && HTML5API.onAdStart && HTML5API.onAdStart(func); }
- function HTML5API_onAdComplete(func) { return window.HTML5API && HTML5API.onAdComplete && HTML5API.onAdComplete(func); }
- function HTML5API_showMidroll() { return window.HTML5API && HTML5API.showMidroll && HTML5API.showMidroll(); }
- function HTML5API_setWidgetState(params) { window.HTML5API && HTML5API.setWidgetState && HTML5API.setWidgetState(params); }
- </script>
- <script>
- window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, false);
- if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
- var meta = document.getElementById ("viewport");
- meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=0');
- }
- </script>
- <style>
- html,body { margin: 0; padding: 0; height: 100%; }
- #openfl-content { background: #000000; width: 100%; height: 100%; z-index: 1; overflow: visible;}
- canvas { display: inherit; margin: 0 auto !important;}
- </style>
- </head>
- <body>
- <div id="openfl-content"></div>
- <script type="text/javascript">
- // Embed application, fit to best window size
- var getSize = function() {
- var orientation = "portrait";
- var element = document.getElementById("openfl-content");
- var clientWidth = element.clientWidth;
- var clientHeight = element.clientHeight;
- var minWidth = 320 ;
- var minHeight = 480 ;
- var finalWidth = minWidth;
- var finalHeight = minHeight;
- if (orientation == "portrait")
- {
- var currRatio = clientHeight / clientWidth;
- var minRatio = minHeight / finalWidth;
- var maxHeight = 568 ;
- if (maxHeight == null) maxHeight = finalHeight;
- var maxRatio = maxHeight / finalWidth;
- if (currRatio <= minRatio)
- {
- finalHeight = minHeight;
- }
- else if (currRatio >= maxRatio)
- {
- finalHeight = maxHeight;
- }
- else
- {
- finalHeight = Math.floor(finalWidth * currRatio);
- }
- }
- else if (orientation == "landscape")
- {
- var currRatio = clientWidth / clientHeight;
- var minRatio = minWidth / finalHeight;
- var maxWidth = null ;
- console.log(maxWidth);
- if (maxWidth == null) maxWidth = finalWidth;
- var maxRatio = maxWidth / finalHeight;
- if (currRatio <= minRatio)
- {
- finalWidth = minWidth;
- }
- else if (currRatio >= maxRatio)
- {
- finalWidth = maxWidth;
- }
- else
- {
- finalWidth = Math.floor(finalHeight * currRatio);
- }
- }
- return {width: finalWidth, height: finalHeight};
- }
- var size = getSize();
- lime.embed ("openfl-content", size.width, size.height, "000000");
- // Resize document width to fix Samsung Galaxy stock-browser render freeze on touch bug:
- if (/Android/.test(navigator.userAgent) && !(/Chrome/.test(navigator.userAgent)))
- {
- var ds = document.documentElement.style;
- var origW = ds.width;
- ds.width = "101%";
- setTimeout(function() { ds.width = origW; }, 500);
- }
- </script>
- <script type="text/JavaScript">
- window.shareData={
- 'title':'打破皮纳塔',
- 'link':'http://game.ikongzhong.cn/games/dapopinata/',
- 'imgurl':'http://game.ikongzhong.cn/games/dapopinata/icon.png'
- }
- window.shareFriendData={
- 'title':'打破皮纳塔',
- 'content':'关注空中传媒网络,更多好玩的游戏等着你。',
- 'link':'http://game.ikongzhong.cn/games/dapopinata/',
- 'imgurl':'http://game.ikongzhong.cn/games/dapopinata/icon.png'
- }
- </script>
- <script type="text/JavaScript" src="http://gc.veiying.cn/code"></script>
- </body>
- </html>
|