index.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>mini炫斗</title>
  5. <meta name="viewport" content="width=device-width,user-scalable=no"/>
  6. <meta charset="utf-8"/>
  7. <meta name="author" content="tg"/>
  8. </head>
  9. <style>
  10. html, body { background-color:#000000;margin:0; padding:0;width:100%;height:100%; text-align: center}
  11. #loadicon{margin-top: 250px; }
  12. #orient{margin-top:50px;}
  13. p{color:#FFFFFF; font-size: 24}
  14. </style>
  15. <script src="js/Base64Images.js"></script>
  16. <body onload="complete();">
  17. <div class="orient" id="orient"><p>请在竖屏情况下使用</p></div>
  18. <div id="loadicon"><img id="img1"/><br/><img id="img2"/><br/><img id="img3"/></div>
  19. <canvas id="gameCanvas" width="445" height="700"></canvas>
  20. <!--<div id="cou" style="width:320px;margin: 0 auto;"></div>3C2F3C" #191919 -->
  21. <script>
  22. // if(typeof(pgvMain) == 'function') pgvMain();
  23. //横屏提示
  24. function orientationChange(){
  25. if(window.orientation==90||window.orientation==-90){
  26. document.getElementById("gameCanvas").style.display="none"
  27. document.getElementById("orient").style.display="block"
  28. }else{
  29. document.getElementById("gameCanvas").style.display="block"
  30. document.getElementById("orient").style.display="none"
  31. }
  32. }
  33. orientationChange();
  34. window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", orientationChange, false);
  35. function trace(v){
  36. // console.log(v)
  37. }
  38. var ccConfig={
  39. "debugMode" : 0,
  40. "showFPS" : false,
  41. "frameRate" : 60,
  42. "id" : "gameCanvas",
  43. "renderMode" : 1,
  44. "engineDir":"./../",
  45. "modules" : ["cocos2d"],
  46. "jsList" : [
  47. ]
  48. }
  49. document["ccConfig"]=ccConfig;
  50. //document.getElementById("img1").src=cc._loaderImage;
  51. document.getElementById("img2").src=cc._loadingImage;
  52. document.getElementById("img3").src=cc.tgideasLogo;
  53. var GD={}
  54. GD.GETNUM=0;
  55. GD.SCORE=0;
  56. GD.MAXHITUM=0;
  57. GD.COMMENT="好厉害";
  58. GD.MAXTIME=60;
  59. GD.SOUND = false;
  60. GD.USETIME=0;
  61. function complete(){
  62. orientationChange();
  63. document.getElementById("loadicon").style.display="none";
  64. cc.game.run();
  65. // var foot = cc.newElement("img");
  66. // foot.style.zIndex=2000;
  67. // foot.style.position="relative"
  68. // foot.src=res.foot;
  69. // document.body.appendChild(foot);
  70. }
  71. // function onBridgeReady() {
  72. // //转发朋友圈
  73. // WeixinJSBridge.on("menu:share:timeline", function(e) {
  74. // var url = 'http://ttxd.qq.com/act/minixd/index.html';
  75. // var data = {
  76. // img_url: "http://ttxd.qq.com/act/minixd/res/xdlogo.png",
  77. // img_width: "126",
  78. // img_height: "126",
  79. // link: url,
  80. // //desc这个属性要加上,虽然不会显示,但是不加暂时会导致无法转发至朋友圈,
  81. // title:"我就是秩序,与敌军奋战"+GD.USETIME+"秒获得"+GD.SCORE+"分,不服来战!",
  82. // desc: " "
  83. // };
  84. // WeixinJSBridge.invoke("shareTimeline", data, function(res) {
  85. // // pgvSendClick({hottag:'act.a20140721hds.shareTimeline'});
  86. // WeixinJSBridge.log(res.err_msg);
  87. // });
  88. // });
  89. // //同步到微博
  90. // WeixinJSBridge.on("menu:share:weibo", function() {
  91. // var url = 'http://ttxd.qq.com/act/minixd/index.html';
  92. // WeixinJSBridge.invoke("shareWeibo", {
  93. // "content": GD.SHAREWORD,
  94. // "url": url
  95. // }, function(res) {
  96. // WeixinJSBridge.log(res.err_msg);
  97. // });
  98. // });
  99. // //分享给朋友
  100. // WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  101. // var url = 'http://ttxd.qq.com/act/minixd/index.html';
  102. // WeixinJSBridge.invoke("sendAppMessage", {
  103. // img_url: "http://ttxd.qq.com/act/minixd/res/xdlogo.png",
  104. // img_width: "126",
  105. // img_height: "126",
  106. // link: url,
  107. // title:"mini炫斗",
  108. // desc: "我就是秩序,与敌军奋战"+GD.USETIME+"秒获得"+GD.SCORE+"分,不服来战!"
  109. // }, function(res) {
  110. // // pgvSendClick({hottag:'act.a20140721hds.sharemessage'});
  111. // WeixinJSBridge.log(res.err_msg)
  112. // });
  113. // });
  114. // };
  115. // try{
  116. // document.addEventListener('WeixinJSBridgeReady', function() {
  117. // onBridgeReady();
  118. // });
  119. // }catch(e){}
  120. </script>
  121. <!--<script src="http://tgideas.qq.com/flash/h5/fight/co/lib/cocos2dtgme.js"></script>-->
  122. <script src="js/resource2.js"></script>
  123. <script src="js/cocos2dtgme2.js"></script>
  124. <script src="js/app2.js"></script>
  125. </body>
  126. </html><!--[if !IE]>|xGv00|8015893c79923a233ea74b42c4f8430a<![endif]-->