index.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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.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. <script>
  21. // if(typeof(pgvMain) == 'function') pgvMain();
  22. //横屏提示
  23. function orientationChange(){
  24. if(window.orientation==90||window.orientation==-90){
  25. document.getElementById("gameCanvas").style.display="none"
  26. document.getElementById("orient").style.display="block"
  27. }else{
  28. document.getElementById("gameCanvas").style.display="block"
  29. document.getElementById("orient").style.display="none"
  30. }
  31. }
  32. document.getElementById("orient").style.display="none";
  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" : 30,
  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.isApp=true,
  57. GD.isWin=false;
  58. GD.MAXHITUM=0;
  59. GD.SHARE="我没能完成勘探新召唤师峡谷的,你行你来啊!"
  60. GD.MAXTIME=60;
  61. GD.SOUND = false;
  62. GD.USETIME=0;
  63. function complete(){
  64. orientationChange();
  65. document.getElementById("loadicon").style.display="none";
  66. cc.game.run();
  67. }
  68. // function onBridgeReady() {
  69. // //转发朋友圈
  70. // WeixinJSBridge.on("menu:share:timeline", function(e) {
  71. // var url = 'http://tgideas.qq.com/flash/h5/lol/map/index.html';
  72. // var data = {
  73. // img_url: "http://tgideas.qq.com/flash/h5/lol/map/res/logo.png",
  74. // img_width: "120",
  75. // img_height: "120",
  76. // link: url,
  77. // //desc这个属性要加上,虽然不会显示,但是不加暂时会导致无法转发至朋友圈,
  78. // title:GD.SHARE,
  79. // desc: " "
  80. // };
  81. // WeixinJSBridge.invoke("shareTimeline", data, function(res) {
  82. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.map.shareTimeline'});
  83. // // pgvSendClick({hottag:'act.a20140721hds.shareTimeline'});
  84. // WeixinJSBridge.log(res.err_msg);
  85. // });
  86. // });
  87. // //同步到微博
  88. // WeixinJSBridge.on("menu:share:weibo", function() {
  89. // var url = 'http://tgideas.qq.com/flash/h5/lol/map/index.html';
  90. // WeixinJSBridge.invoke("shareWeibo", {
  91. // "content": GD.SHARE,
  92. // "url": url
  93. // }, function(res) {
  94. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.map.shareweibo'});
  95. // WeixinJSBridge.log(res.err_msg);
  96. // });
  97. // });
  98. // //分享给朋友
  99. // WeixinJSBridge.on('menu:share:appmessage', function(argv) {
  100. // var url = 'http://tgideas.qq.com/flash/h5/lol/map/index.html';
  101. // WeixinJSBridge.invoke("sendAppMessage", {
  102. // img_url: "http://tgideas.qq.com/flash/h5/lol/map/res/logo.png",
  103. // img_width: "120",
  104. // img_height: "120",
  105. // link: url,
  106. // title:"新召唤师峡谷大冒险",
  107. // desc: GD.SHARE
  108. // }, function(res) {
  109. // if(pgvSendClick&&typeof(pgvSendClick) == 'function') pgvSendClick({hottag:'h5game.map.sharemessage'});
  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="js/cocos2dtgme.js"></script>
  122. <script src="js/app2.js"></script>
  123. </body>
  124. </html><!--[if !IE]>|xGv00|f8fe75e375b05ed39aa2e9afbf0aec86<![endif]-->