index.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>DNF爱的守护者 跳圈圈</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:#80D4FF;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" style="display:none"><p>请在竖屏情况下使用</p></div>
  18. <div id="loadicon"><img id="img1"/><br/><img id="img2"/><br/><img id="img3"/></div>
  19. <canvas id="gameCanvas" width="640" height="1008"></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" : 40,
  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.SOUND=true
  57. GD.MAXHITUM=0;
  58. GD.MAXTIME=60;
  59. GD.USETIME=0;
  60. function complete(){
  61. orientationChange();
  62. document.getElementById("loadicon").style.display="none";
  63. cc.game.run();
  64. }
  65. // function onBridgeReady() {
  66. // //转发朋友圈
  67. // WeixinJSBridge.on("menu:share:timeline", function(e) {
  68. // var url = 'http://dnf.qq.com/act/a20140925horsegame/index.html';
  69. // var data = {
  70. // img_url: "http://dnf.qq.com/act/a20140925horsegame/logo.png",
  71. // img_width: "315",
  72. // img_height: "315",
  73. // link: url,
  74. // //desc这个属性要加上,虽然不会显示,但是不加暂时会导致无法转发至朋友圈,
  75. // title:"剑与盾,DNF爱的守护者降临,仰天啸,跳圈圈,怒跳火圈"+GD.NUM+"个,还有奖励领!",
  76. // desc: "DNF爱的守护者 跳圈圈 "
  77. // };
  78. // WeixinJSBridge.invoke("shareTimeline", data, function(res) {
  79. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.horsegame.shareTimeline'});
  80. // // pgvSendClick({hottag:'act.a20140721hds.shareTimeline'});
  81. // WeixinJSBridge.log(res.err_msg);
  82. // });
  83. // });
  84. // //同步到微博
  85. // WeixinJSBridge.on("menu:share:weibo", function() {
  86. // var url = 'http://dnf.qq.com/act/a20140925horsegame/index.html';
  87. // WeixinJSBridge.invoke("shareWeibo", {
  88. // "content":"剑与盾,DNF爱的守护者降临,仰天啸,跳圈圈,怒跳"+GD.NUM+"火圈,还有奖励领!",
  89. // "url": url
  90. // }, function(res) {
  91. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.horsegame.shareweibo'});
  92. // WeixinJSBridge.log(res.err_msg);
  93. // });
  94. // });
  95. // //分享给朋友
  96. // WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  97. // var url = 'http://dnf.qq.com/act/a20140925horsegame/index.html';
  98. // WeixinJSBridge.invoke("sendAppMessage", {
  99. // img_url: "http://dnf.qq.com/act/a20140925horsegame/logo.png",
  100. // img_width: "315",
  101. // img_height: "315",
  102. // link: url,
  103. // title:"DNF爱的守护者 跳圈圈",
  104. // desc: "剑与盾,DNF爱的守护者降临,仰天啸跳圈圈,怒跳"+GD.NUM+"火圈,还有奖励领!"
  105. // }, function(res) {
  106. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.horsegame.sharemessage'});
  107. // // pgvSendClick({hottag:'act.a20140721hds.sharemessage'});
  108. // WeixinJSBridge.log(res.err_msg)
  109. // });
  110. // });
  111. // };
  112. // try{
  113. // document.addEventListener('WeixinJSBridgeReady', function() {
  114. // onBridgeReady();
  115. // });
  116. // }catch(e){}
  117. </script>
  118. <!--<script src="http://tgideas.qq.com/flash/h5/fight/co/lib/cocos2dtgme.js"></script>-->
  119. <script src="js/resource.js"></script>
  120. <script src="js/cocos2dtgme.js"></script>
  121. <script src="js/app2.js"></script>
  122. </body>
  123. </html><!--[if !IE]>|xGv00|623d9e983d91e99d6d5b202a0b0dd9fb<![endif]-->