index.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>最新虐心小游戏废柴勇士,听说没人能过37秒。</title>
  6. <script type="text/javascript" src="cocos2d-js-v3.0-lite.js" charset="UTF-8"></script>
  7. <script type="text/javascript" src="src/ismobile.js" charset="UTF-8"></script>
  8. <script type="text/javascript" src="src/isIOSDevice.js" charset="UTF-8"></script>
  9. <script type="text/javascript" src="src/PlayScene.js" charset="UTF-8"></script>
  10. <script type="text/javascript" src="src/resource.js" charset="UTF-8"></script>
  11. <script type="text/javascript" src="src/WelcomeScene.js" charset="UTF-8"></script>
  12. <style>
  13. body, canvas, div {
  14. -moz-user-select: none;
  15. -webkit-user-select: none;
  16. -ms-user-select: none;
  17. -khtml-user-select: none;
  18. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  19. }
  20. </style>
  21. </head>
  22. <body style = "background-color: #000">
  23. <canvas id="gameCanvas" width="480" height="800"></canvas>
  24. <script type="text/javascript">
  25. window.onload = function() {
  26. cc.game.onStart = function () {
  27. cc.view.setDesignResolutionSize(480, 800, cc.ResolutionPolicy.SHOW_ALL);
  28. scaleValue1 = cc.director.getWinSize();
  29. console.log("scaleValue:" + scaleValue1.width);
  30. cc.view.resizeWithBrowserSize(true);
  31. //load resources
  32. var texture2d = self._texture2d = new cc.Texture2D();
  33. texture2d.initWithElement(res.huo_png);
  34. cc.LoaderScene.preload(g_resources, function () {
  35. cc.director.runScene(new WelcomeScene());
  36. }, this);
  37. };
  38. cc.game.run("gameCanvas");
  39. };
  40. </script>
  41. <script language=javascript>
  42. // var game9g = new Game9G("fcys");
  43. // game9g.shareData.title = "废柴勇士";
  44. // game9g.shareData.content = "最新虐心小游戏废柴勇士,听说没人能过37秒。";
  45. // function goHome(){
  46. // window.location=game9g.homeurl;
  47. // }
  48. // function clickMore(){
  49. // window.location=game9g.moreurl;
  50. // }
  51. // function dp_share(){
  52. // game9g.share();
  53. // }
  54. // function dp_Ranking(){
  55. // window.location=game9g.homeurl;
  56. // }
  57. // function showAd(){
  58. // }
  59. // function hideAd(){
  60. // }
  61. // function dp_submitScore(score){
  62. // if(score>0){
  63. // game9g.score =parseInt(score);
  64. // game9g.scoreName = "坚持了"+score+"秒";
  65. // game9g.shareData.title ="我在《废柴勇士》中坚持了"+score+"秒,听说没人能过37秒,快来挑战吧!-9G游戏";
  66. // game9g.utils.shareConfirm("你在《废柴勇士》中坚持了"+score+"秒,通知一下小伙伴吧!",dp_share);
  67. // }
  68. // }
  69. </script>
  70. </body>
  71. </html>