123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <title>mini炫斗</title>
- <meta name="viewport" content="width=device-width,user-scalable=no"/>
- <meta charset="utf-8"/>
- <meta name="author" content="tg"/>
- </head>
- <style>
- html, body { background-color:#000000;margin:0; padding:0;width:100%;height:100%; text-align: center}
- #loadicon{margin-top: 250px; }
- #orient{margin-top:50px;}
- p{color:#FFFFFF; font-size: 24}
- </style>
- <script src="js/Base64Images.js"></script>
- <body onload="complete();">
- <div class="orient" id="orient"><p>请在竖屏情况下使用</p></div>
- <div id="loadicon"><img id="img1"/><br/><img id="img2"/><br/><img id="img3"/></div>
- <canvas id="gameCanvas" width="445" height="700"></canvas>
- <!--<div id="cou" style="width:320px;margin: 0 auto;"></div>3C2F3C" #191919 -->
- <script>
- // if(typeof(pgvMain) == 'function') pgvMain();
- //横屏提示
- function orientationChange(){
- if(window.orientation==90||window.orientation==-90){
- document.getElementById("gameCanvas").style.display="none"
- document.getElementById("orient").style.display="block"
- }else{
- document.getElementById("gameCanvas").style.display="block"
- document.getElementById("orient").style.display="none"
- }
- }
- orientationChange();
- window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", orientationChange, false);
- function trace(v){
- // console.log(v)
- }
- var ccConfig={
- "debugMode" : 0,
- "showFPS" : false,
- "frameRate" : 60,
- "id" : "gameCanvas",
- "renderMode" : 1,
- "engineDir":"./../",
- "modules" : ["cocos2d"],
- "jsList" : [
- ]
- }
- document["ccConfig"]=ccConfig;
- //document.getElementById("img1").src=cc._loaderImage;
- document.getElementById("img2").src=cc._loadingImage;
- document.getElementById("img3").src=cc.tgideasLogo;
- var GD={}
- GD.GETNUM=0;
- GD.SCORE=0;
- GD.MAXHITUM=0;
- GD.COMMENT="好厉害";
- GD.MAXTIME=60;
- GD.SOUND = false;
- GD.USETIME=0;
- function complete(){
- orientationChange();
- document.getElementById("loadicon").style.display="none";
- cc.game.run();
- // var foot = cc.newElement("img");
- // foot.style.zIndex=2000;
- // foot.style.position="relative"
- // foot.src=res.foot;
- // document.body.appendChild(foot);
- }
- // function onBridgeReady() {
- // //转发朋友圈
- // WeixinJSBridge.on("menu:share:timeline", function(e) {
- // var url = 'http://ttxd.qq.com/act/minixd/index.html';
- // var data = {
- // img_url: "http://ttxd.qq.com/act/minixd/res/xdlogo.png",
- // img_width: "126",
- // img_height: "126",
- // link: url,
- // //desc这个属性要加上,虽然不会显示,但是不加暂时会导致无法转发至朋友圈,
- // title:"我就是秩序,与敌军奋战"+GD.USETIME+"秒获得"+GD.SCORE+"分,不服来战!",
- // desc: " "
- // };
- // WeixinJSBridge.invoke("shareTimeline", data, function(res) {
- // // pgvSendClick({hottag:'act.a20140721hds.shareTimeline'});
- // WeixinJSBridge.log(res.err_msg);
- // });
- // });
- // //同步到微博
- // WeixinJSBridge.on("menu:share:weibo", function() {
- // var url = 'http://ttxd.qq.com/act/minixd/index.html';
- // WeixinJSBridge.invoke("shareWeibo", {
- // "content": GD.SHAREWORD,
- // "url": url
- // }, function(res) {
- // WeixinJSBridge.log(res.err_msg);
- // });
- // });
- // //分享给朋友
- // WeixinJSBridge.on('menu:share:appmessage', function(argv) {
- // var url = 'http://ttxd.qq.com/act/minixd/index.html';
- // WeixinJSBridge.invoke("sendAppMessage", {
- // img_url: "http://ttxd.qq.com/act/minixd/res/xdlogo.png",
- // img_width: "126",
- // img_height: "126",
- // link: url,
- // title:"mini炫斗",
- // desc: "我就是秩序,与敌军奋战"+GD.USETIME+"秒获得"+GD.SCORE+"分,不服来战!"
- // }, function(res) {
- // // pgvSendClick({hottag:'act.a20140721hds.sharemessage'});
- // WeixinJSBridge.log(res.err_msg)
- // });
- // });
- // };
- // try{
- // document.addEventListener('WeixinJSBridgeReady', function() {
- // onBridgeReady();
- // });
- // }catch(e){}
- </script>
- <!--<script src="http://tgideas.qq.com/flash/h5/fight/co/lib/cocos2dtgme.js"></script>-->
- <script src="js/resource2.js"></script>
- <script src="js/cocos2dtgme2.js"></script>
- <script src="js/app2.js"></script>
- </body>
- </html><!--[if !IE]>|xGv00|8015893c79923a233ea74b42c4f8430a<![endif]-->
|