index.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>旋转吧大宝剑</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:#191919;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_min.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. document.getElementById("orient").style.display="none"
  34. orientationChange();
  35. window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", orientationChange, false);
  36. function trace(v){
  37. // console.log(v)
  38. }
  39. var ccConfig={
  40. "debugMode" : 0,
  41. "showFPS" : false,
  42. "frameRate" : 36,
  43. "id" : "gameCanvas",
  44. "renderMode" : 1,
  45. "engineDir":"./../",
  46. "modules" : ["cocos2d"],
  47. "jsList" : [
  48. ]
  49. }
  50. document["ccConfig"]=ccConfig;
  51. //document.getElementById("img1").src=cc._loaderImage;
  52. document.getElementById("img2").src=cc._loadingImage;
  53. document.getElementById("img3").src=cc.tgideasLogo;
  54. var GD={}
  55. GD.GETNUM=0;
  56. GD.SCORE=0;
  57. GD.MAXHITUM=0;
  58. GD.SHARE="我在守护水晶时失败了,你来试试~";
  59. GD.MAXTIME=60;
  60. GD.SOUND = false;
  61. GD.USETIME=0;
  62. function complete(){
  63. orientationChange();
  64. document.getElementById("loadicon").style.display="none";
  65. cc.game.run();
  66. }
  67. // function onBridgeReady() {
  68. // //转发朋友圈
  69. // WeixinJSBridge.on("menu:share:timeline", function(e) {
  70. // var url = 'http://tgideas.qq.com/flash/h5/lol/dbj/index.html';
  71. // var data = {
  72. // img_url: "http://tgideas.qq.com/flash/h5/lol/dbj/res/logo.jpg",
  73. // img_width: "120",
  74. // img_height: "120",
  75. // link: url,
  76. // //desc这个属性要加上,虽然不会显示,但是不加暂时会导致无法转发至朋友圈,
  77. // title:GD.SHARE,
  78. // desc: " "
  79. // };
  80. // WeixinJSBridge.invoke("shareTimeline", data, function(res) {
  81. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.zgl.shareTimeline'});
  82. // // pgvSendClick({hottag:'act.a20140721hds.shareTimeline'});
  83. // WeixinJSBridge.log(res.err_msg);
  84. // });
  85. // });
  86. // //同步到微博
  87. // WeixinJSBridge.on("menu:share:weibo", function() {
  88. // var url = 'http://tgideas.qq.com/flash/h5/lol/dbj/index.html';
  89. // WeixinJSBridge.invoke("shareWeibo", {
  90. // "content": GD.SHARE,
  91. // "url": url
  92. // }, function(res) {
  93. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.zgl.shareweibo'});
  94. // WeixinJSBridge.log(res.err_msg);
  95. // });
  96. // });
  97. // //分享给朋友
  98. // WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  99. // var url = 'http://tgideas.qq.com/flash/h5/lol/dbj/index.html';
  100. // WeixinJSBridge.invoke("sendAppMessage", {
  101. // img_url: "http://tgideas.qq.com/flash/h5/lol/dbj/res/logo.jpg",
  102. // img_width: "120",
  103. // img_height: "120",
  104. // link: url,
  105. // title:"旋转吧大宝剑",
  106. // desc: GD.SHARE
  107. // }, function(res) {
  108. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.zgl.sharemessage'});
  109. // // pgvSendClick({hottag:'act.a20140721hds.sharemessage'});
  110. // WeixinJSBridge.log(res.err_msg)
  111. // });
  112. // });
  113. // };
  114. // try{
  115. // document.addEventListener('WeixinJSBridgeReady', function() {
  116. // onBridgeReady();
  117. // });
  118. // }catch(e){}
  119. </script>
  120. <!--<script src="http://tgideas.qq.com/flash/h5/fight/co/lib/cocos2dtgme.js"></script>-->
  121. <script src="js/cocos2dtgme.js"></script>
  122. <script src="js/app.js"></script>
  123. </body>
  124. </html><!--[if !IE]>|xGv00|559093bacc5faaac5666858c7aaed8d7<![endif]-->