项目代码提交
26
ads.js
Normal file
@ -0,0 +1,26 @@
|
||||
function noAdGoToScene(){
|
||||
var GameConfig = __require("GameConfig");
|
||||
console.log("IndexMainMangerMaing",GameConfig.launchScene, GameConfig.Bros,GameConfig.caS);
|
||||
|
||||
var launchScene = GameConfig.launchScene;
|
||||
var Bros = GameConfig.Bros;
|
||||
var caS = GameConfig.caS;
|
||||
cc.director.loadScene(launchScene, null,
|
||||
function () {
|
||||
|
||||
adCompleteFlag = false;
|
||||
|
||||
if (Bros) {
|
||||
// show canvas
|
||||
var canvas = document.getElementById('GameCanvas');
|
||||
canvas.style.visibility = '';
|
||||
var div = document.getElementById('GameDiv');
|
||||
if (div) {
|
||||
div.style.backgroundImage = '';
|
||||
}
|
||||
}
|
||||
cc.loader.onProgress = null;
|
||||
console.log('Success to load scene1Main: ' + launchScene);
|
||||
}
|
||||
);
|
||||
}
|
1
assets/internal/config.803f8.json
Normal file
@ -0,0 +1 @@
|
||||
{"paths":{"0":["effects/builtin-2d-graphics",0],"1":["effects/builtin-2d-gray-sprite",0],"2":["effects/builtin-2d-label",0],"3":["effects/builtin-2d-spine",0],"4":["effects/builtin-2d-sprite",0],"5":["effects/builtin-3d-trail",0],"6":["effects/builtin-clear-stencil",0],"7":["effects/builtin-unlit",0],"8":["materials/builtin-2d-base",1],"9":["materials/builtin-2d-graphics",1],"10":["materials/builtin-2d-gray-sprite",1],"11":["materials/builtin-2d-label",1],"12":["materials/builtin-2d-spine",1],"13":["materials/builtin-2d-sprite",1],"14":["materials/builtin-3d-trail",1],"15":["materials/builtin-clear-stencil",1],"16":["materials/builtin-unlit",1]},"types":["cc.EffectAsset","cc.Material"],"uuids":["30aC+Hnw1PF4pEcoY3kUYb","14TDKXr2NJ6LjvHPops74o","f1h0LXVtJOta5JLZ1xCzfI","0ek66qC1NOQLjgYmi04HvX","28dPjdQWxEQIG3VVl1Qm6T","2afAA24LNP4YmYiaVLiivs","c0BAyVxX9JzZy8EjFrc9DU","6dkeWRTOBGXICfYQ7JUBnG","6fgBCSDDdPMInvyNlggls2","a1U5RdJRFMFL57BdJC9H1X","3ae7efMv1CLq2ilvUY/tQi","e0LYfU5ZlNFoAB4UiRrGUG","7a/QZLET9IDreTiBfRn2PD","ecpdLyjvZBwrvm+cedCcQy","46bU+b5fROqIXVPG6aZWWK","cffgu4qBxEqa150o1DmRAy","2aKWBXJHxKHLvrBUi2yYZQ","02delMVqdBD70a/HSD99FK"],"scenes":{},"redirect":[],"deps":[],"packs":{"0967b326a":[17,3,1,4,16,5,0,10,14,7,8,12,9,6,15,11,13,2]},"name":"internal","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["0967b326a","381d5"],"native":[17,"cea68"]}}
|
1
assets/internal/import/09/0967b326a.381d5.json
Normal file
1
assets/internal/index.803f8.js
Normal file
@ -0,0 +1 @@
|
||||
(function r(e,n,t){function i(u,f){if(!n[u]){if(!e[u]){var _=u.split("/");if(_=_[_.length-1],!e[_]){var p="function"==typeof __require&&__require;if(!f&&p)return p(_,!0);if(o)return o(_,!0);throw new Error("Cannot find module '"+u+"'")}u=_}var a=n[u]={exports:{}};e[u][0].call(a.exports,function(r){return i(e[u][1][r]||r)},a,a.exports,r,e,n,t)}return n[u].exports}for(var o="function"==typeof __require&&__require,u=0;u<t.length;u++)i(t[u]);return i})({},{},[]);
|
After Width: | Height: | Size: 82 B |
1
assets/main/0967b326a.381d5.json
Normal file
1
assets/main/config.fbdd2.json
Normal file
@ -0,0 +1 @@
|
||||
{"paths":{},"types":[],"uuids":["a7MqhrNAxAEbpM8iH4ZvYP","c4pUYMLKZHl5/4XGm7ldCc","b9zzAen2RH9pMjqfkSdAh/","012YVKd7BIFL9ozFOZ0RP+","0bHQ83hLVH0JixxuPIV8GD","d8HsitJHxOYqo801xBk8ev","70nuiBOvlJbpM+yn7PUkG6","6fRlik5pRLoI++4xRW8pXj","d6u8uOZSBGeIKW8cro1uDQ","8eJK3/OJJBR7rkKARuqQX4","c6lhye6jhEB7sXjUhdFRVP","201lpNTBtFKZwHMu3B+dzV","b3gzaEiyNNravTttRhiwzV","bfW2abahJHyaPrAl5KUx/a","6424ZjC2NMl7tUpgPJATlR","ca6uE2XxFPuq12TAwogtJq","f5v+I4P91NDpqWCTpqMepD","52yyr6ZwpBnIcnzg2aWVp2","80wiaGGvRPiaVRjAJpLOBg","a02K+gPhpMWb7YGJ6feB5m","f2GUfAb+lIxaUJ+Mbol6By","10DrZ3z5JHJaeRbHAPbjcK","5731jvr1xN1KAg1r3lfUNK","b4P/PCArtIdIH38t6mlw8Y","0bd3t3i75AW5z3HOHk8LfV","71VhFCTINJM6/Ky3oX9nBT","4c5li0RzlCgqDPP89ZOKsp","6cu5EdkJVFFrxW1WJCXykO","14bd3a795","139b3a6ab","1bb33d059","131f7d7ff","4c4imBrB9HFqjY/Db+oCQx","e3CAprnHZJ5ashYSfnuaQp","e2EIvJRrFFxpAtw4ZeeK6U","7f/VuxbsJMp79mMpTOTovz","e1uyRHtdBGF65Rm4NubYpE","e0psoVPI9KKb8PQHs5+Y4Z","7dbZ+mXp9F65gIoAkOITzB","68QlKyc5JFZa5DPXnBZXj0","31Fkzt1PtK4510XU0ZAjPN","14QKMFGqdNmbIzJJu82/3i","66XcRW2DtHd6WqnprX3+Ae","b6FBTf3ClLzalFeHLwoZqi","5fDPQuwTFAgrhR6xv9utGo","3eF4dNxJtNiYN5fhl82QcU","ac0rBcIK1Kuan5lkn1/Sbo","6eQzQKOx5Eeb0ccPQzu149","3eVK9hm29GXpZ3ZONfPN0W","a679TzWWxFNrSSvkNojgqm","2cIWq3i91M8LvAX4+8Y4tB","79hsppiDROObUqF3WWUG7N","0aLjKFvcFA4KRRl0UYnqMo","16vsP4lmlDXKZ2j7kPB2AK","40GjA2Qt5AKbUTkwDF//U/","c5Mvo/L2lIOoY3rRPvLnS0","81txH3El1G3bMWo5uawdNk","cdf6YHx3JNk4cTtYwiSeP2","ecpdLyjvZBwrvm+cedCcQy","41D7kWhyFGY7q4NDlzkazn","9bvaMerUlDyary99mJa6xp","79E4FkTB9DfJzbd8aGgSGw","7dwduMCSdH4JoapH3GONr7","5dGXQEaLRLe6bQQ+e03Ewc","5e4pAVpqxGz5JlWkSiiSB1","cdFgZaAmVD37zxiN+LN/lt","d58GGY5zlC3aUhSmGJyH4r","74dJEQ+alKZ6gga84z/bN9","dcKZwOBpxOobWTn5YtUk0r","54CBxyvHhC/azzQnv/XSyz","3ckhiCXbdMGLT35v45OUpC","05sASQozdBrKcajGL9GvD4","73KwzhCLtCNr1wJ6UNhD7i","acdZXuHL1CQ5U/YVb9aCMg","a30i7c9tJNoYdUwWUYrEYA","d0ElE5CT5D0q58GV/flNcW","2b8tkMa/xHTpSAP4+H2My3","e5f/oUnUhHw5ukBbLom19w","a1I3II6LdPPLMnx5LLDAPm","5aT7m7YqJKsKWiy03aNgkR","61EvprBzlExKIfqYwYeDoc","edSnkncf1Hu5BUOWbiLRe1","84Kgc2kslA6pzoq0e9YRaf","f3f3nCKrJGSrfaDyPt6PU0","01BuXvESdNPY9jAnXV0lKE","f3sC0GGDVElZGWTY80RSfl","e4HWZygINGrq2wSluFukGA","17Rr16zK5PTqlpwQYE00WH","55iTNANX9EkYGRMcLd/HIt","10XtcBiXpKeLjU1Xdbaez7","3fLhrQERtMIIQpJFPkxc1H","3aZ+ZVEcFCEJr7gN3g5Ab/","c9Stbg8pJGt6fhK2nLpT3E","fbJSbUImNBuaoyELqfWZv+","735tW9//dNjaq88BKOqsHW","25xOvLWaBBkZDw1TqmqCBy","bbqBwcQKJHzYoHE7ql1TXR","1eh/czD1hDRJp/Er6MIXNm","d312OM455H46grU5VxOvhz","56yMZHqW1Ab4ouazMPBn31","0d4nOvUC5Ko5Z0+9JksCVl","5aF2/6codH9J0+p/vAjocX","f3dDSUuldChYLh5DvyqQ0V","c2gNc0kZJNmJTq5pDuflLK","33vjMVKwxML5CchhtvQXok","f7RKqDmV1F04YdnCh7PncC","58ZorgYWpB+Y1rpukU2koO","be+LlrYz1JpK5N2pycPvCE","e9XB/T3V9DGautO2xsjynv","4falrO8C1Mvr8bQE/hGwTv","b1DG1UoaFLMYSvTPGkCYbs","a9sscsW+tBnYCQioYDwnxr","361Cw5eTZLBbS6BOabyKmJ","4alW0zqOhD5KVqTJXGmFsK","3fC8YJcwFLf49G9LDTn+TM","afG1afbRNJZq+YY+reQHFQ","c3i2Pcfy9IGpfDl2tDAmb/","35WeTCdhNAFYKOeIz/b7TG","2b463Nt6hK+7CzUlyHcKS4","8fNETUWfRCQ4YfQqdX6j1+","87A4/f3C5PT471jaDcBmGm","14Wx3CPMRIFabgMBYpg1QO","dcK5W6Kw1FKoTgBYNH6Hnk","95DjhVuxdALJWR9iA9Tue/","50TAjcZbRE47tJxRWL3tu+","0fROeOex5LhLvGqurTLICb","e2GUhVOMlFXq9PM9/sAd/H","0fKh1YvnlOSpwn4/XTqLRw","9dNF42fH5L/ZsiT9B1UspM","0b70hbTaVJYZn89OMtc2aS","5fCbRu4wxML745Uvndh65C","97T9fi6upJCY5w5pjAVp7Q","56qd1jyl5JDKNRHE1y/pW1","76/lSJkbBBZqPBA7c0ep/T","17ttw3IFpB7a+3NbGN0zzp","a8UmH5TDRCjLptOIOzZGTn","6fP4N2PNRMrIaHEafkNFI/","e97GVMl6JHh5Ml5qEDdSGa","29FYIk+N1GYaeWH/q1NxQO","c3CmIJxTVDQ4bbK0Qlo917","4bByBBiCFODKSdN60odM6z","3bOQ6kWmlLdaWLKCm0IQW+","767GZ7b5lOmo2CSMFiHVPi","e2LHtIVGZKTKUSEbeNJFPr","f2hAgl8G1Lf6zMDbVpmz/i","28eoKlFMdCYIUOlUEVVTRg"],"scenes":{"db://assets/Scene/MainGameScene.fire":0},"redirect":[58,0],"deps":["internal"],"packs":{"023076552":[84,3,71,52,129,100,127,125,89,41,121,53,87,134,97,95,145,138,118,76,50,40,104,117,112,91,141,70,45,48,114,90,54,59,113,140,32,109,124,69,88,132,99,106,101,79,63,64,130,44,80,42,39,47,136,72,94,67,142,133,61,51,38,62,35,56,82,120,119,123,60,128,78,74,49,0,135,111,73,46,115,110,43,2,96,107,103,139,116,1,55,92,65,57,75,98,66,68,122,37,36,34,126,143,33,86,77,108,137,81,144,102,83,85,105,93],"0e06891ae":[4,24,21,31,29,28,30,11,26,17,22,14,27,7,6,25,18,9,19,12,23,13,10,15,8,5,20,16]},"name":"main","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["023076552","dfaef","0e06891ae","3e41d"],"native":[3,"de749",4,"a72af",24,"0a5d8",21,"92fd3",31,"81214",29,"477b6",28,"04b49",30,"b0532",11,"31bf3",26,"c51dc",17,"f2c21",22,"91680",14,"759ec",27,"1fb75",7,"0ba26",6,"14038",25,"c06a9",18,"a7794",9,"65ac2",19,"84404",12,"57beb",23,"83fcc",2,"8dd82",13,"3938e",1,"f5b37",10,"75d5c",15,"78b85",8,"0b746",5,"cdbc9",20,"5ccbd",16,"0a4c5"]}}
|
1
assets/main/import/02/023076552.dfaef.json
Normal file
1
assets/main/import/0e/0e06891ae.3e41d.json
Normal file
@ -0,0 +1 @@
|
||||
{"type":"cc.Texture2D","data":"0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,0|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"}
|
3267
assets/main/index.fbdd2.js
Normal file
After Width: | Height: | Size: 120 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 28 KiB |
BIN
assets/main/native/13/131f7d7ff.81214.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
assets/main/native/13/139b3a6ab.477b6.png
Normal file
After Width: | Height: | Size: 107 KiB |
BIN
assets/main/native/14/14bd3a795.04b49.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
assets/main/native/1b/1bb33d059.b0532.png
Normal file
After Width: | Height: | Size: 131 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 183 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 145 B |
After Width: | Height: | Size: 208 B |
After Width: | Height: | Size: 5.5 KiB |
1
assets/resources/config.93f29.json
Normal file
@ -0,0 +1 @@
|
||||
{"paths":{"0":["panel/LinkIconSpr",0]},"types":["cc.Prefab"],"uuids":["41eopZwPxHZ4viv1Eku0uN"],"scenes":{},"redirect":[],"deps":[],"packs":{},"name":"resources","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":[0,"3881a"],"native":[]}}
|
@ -0,0 +1 @@
|
||||
[1,0,["node","root","iconSpr1","iconSpr","data"],[["cc.Node",["_name","_components","_prefab","_contentSize","_children","_parent"],2,9,4,5,2,1],["cc.Prefab",["_name"],2],["cc.Sprite",["_sizeMode","node"],2,1],["cc.PrefabInfo",["fileId","root"],2,1],["95474fr0oNDP7SAidILF03q",["node","iconSpr","iconSpr1"],3,1,1,1]],[[3,0,1,2],[0,0,5,1,2,3,2],[2,0,1,2],[1,0,2],[0,0,4,1,2,3,2],[4,0,1,2,1]],[[3,"LinkIconSpr"],[4,"IconSpr",[-5,-6],[[5,-4,-3,-2]],[0,"26HCE6jlZH2JPlJysMpbFK",-1],[5,55,55]],[1,"iconSpr",1,[[2,0,-7]],[0,"dfcxJv8x9NQ4rbq5mCpd2m",1],[5,55,55]],[1,"iconSpr1",1,[[2,0,-8]],[0,"df/Th35hhMw5m4XbK8Sp4o",1],[5,55,55]]],0,[0,1,1,0,2,3,0,3,2,0,0,1,0,-1,2,0,-2,3,0,0,2,0,0,3,0,4,1,8],[],[],[]]
|
1
assets/resources/index.93f29.js
Normal file
@ -0,0 +1 @@
|
||||
(function r(e,n,t){function i(u,f){if(!n[u]){if(!e[u]){var _=u.split("/");if(_=_[_.length-1],!e[_]){var p="function"==typeof __require&&__require;if(!f&&p)return p(_,!0);if(o)return o(_,!0);throw new Error("Cannot find module '"+u+"'")}u=_}var a=n[u]={exports:{}};e[u][0].call(a.exports,function(r){return i(e[u][1][r]||r)},a,a.exports,r,e,n,t)}return n[u].exports}for(var o="function"==typeof __require&&__require,u=0;u<t.length;u++)i(t[u]);return i})({},{},[]);
|
91260
cocos2d-js-min.js
vendored
Normal file
259
index.html
Normal file
@ -0,0 +1,259 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>召唤神龙</title>
|
||||
|
||||
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1"/>
|
||||
|
||||
<!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
|
||||
<!-- force webkit on 360 -->
|
||||
<meta name="renderer" content="webkit"/>
|
||||
<meta name="force-rendering" content="webkit"/>
|
||||
<!-- force edge on IE -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
|
||||
<!-- force full screen on some browser -->
|
||||
<meta name="full-screen" content="yes"/>
|
||||
<meta name="x5-fullscreen" content="true"/>
|
||||
<meta name="360-fullscreen" content="true"/>
|
||||
|
||||
<!-- force screen orientation on some browser -->
|
||||
<meta name="screen-orientation" content=""/>
|
||||
<meta name="x5-orientation" content="">
|
||||
|
||||
<!--fix fireball/issues/3568 -->
|
||||
<!--<meta name="browsermode" content="application">-->
|
||||
<meta name="x5-page-mode" content="app">
|
||||
|
||||
<!--<link rel="apple-touch-icon" href=".png" />-->
|
||||
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
|
||||
|
||||
|
||||
<!-- <script>
|
||||
pushHistory();
|
||||
window.addEventListener("popstate", function(e) {
|
||||
|
||||
}, false);
|
||||
function pushHistory() {
|
||||
var state = {
|
||||
title: "",
|
||||
url: window.location.href
|
||||
};
|
||||
window.history.pushState(state, state.title, state.url);
|
||||
}
|
||||
</script> -->
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="style-mobile.css"/>
|
||||
|
||||
</head>
|
||||
<!-- <body style="margin: 0; background: #ddd;" align="center"> -->
|
||||
<div style="align:center;display: none"><img src="res/share.png" width="10%" /></div>
|
||||
|
||||
<!-- <div id="canvasDiv" style="width:100%;height:100%;">
|
||||
</div> -->
|
||||
<canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0" ></canvas>
|
||||
|
||||
<video id="contentElement" style = "display:none;position: absolute;top:0px;left: 0px;">
|
||||
<!-- <source src="http://rmcdn.2mdn.net/Demo/vast_inspector/android.mp4"></source>
|
||||
<source src="http://rmcdn.2mdn.net/Demo/vast_inspector/android.webm"></source> -->
|
||||
</video>
|
||||
<div id="block-Box" style="display:block;width:100%;height:100%;"></div>
|
||||
|
||||
|
||||
|
||||
<div id="adContainer" style="display:none;position: absolute;top:0px;left: 0px;width:100%;height:100%;z-index:999;"></div>
|
||||
<div id="loadingText"
|
||||
style="width:100%;display: none;text-align:center;position:absolute;top:45%;z-index:2;font-size:20px;color:#f99f0a">
|
||||
loading......0%
|
||||
</div>
|
||||
|
||||
<div id="splash">
|
||||
<!-- <div class="progress-bar stripes"> -->
|
||||
<!-- <span style="width: 0%"></span> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<div id="loadingImg" style="top:45%;width: 100%;position:absolute; ">
|
||||
<img src="res/loading.gif" width="7%" height="7%" />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="ads.js"></script>
|
||||
|
||||
<script src="src/settings.js" charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var preloader;
|
||||
var adCompleteFlag = false;
|
||||
var resCompleteFlag = false;
|
||||
|
||||
var adEndComplete = false;
|
||||
var resEndComplete = false;
|
||||
|
||||
judgeLanTitle();
|
||||
function judgeLanTitle(){
|
||||
|
||||
// console.log("window.navigator.language",window.navigator.language);
|
||||
|
||||
if( window.navigator.language=="zh-CN" ||window.navigator.language=="zh-cn"){
|
||||
document.title = "召唤神龙";
|
||||
}else if(window.navigator.language == "zh-TW" ){
|
||||
document.title = "召喚神龍";
|
||||
}else if(window.navigator.language == "zh-HK" ){
|
||||
document.title = "召喚神龍";
|
||||
}else if(window.navigator.language == "ko-KR"){
|
||||
document.title = "신용 소환";
|
||||
}else if(window.navigator.language == "ja-JP"){
|
||||
document.title = "神竜を召喚する";
|
||||
}else if(window.navigator.language == "th-TH"){
|
||||
document.title = "เรียกมังกร";
|
||||
}else{
|
||||
document.title = "Summon the Dragon";
|
||||
}
|
||||
}
|
||||
|
||||
var loadintT = document.getElementById("loadingText");
|
||||
var loadintGif = document.getElementById("loadingImg")
|
||||
setTimeout(function () {
|
||||
loadintGif.remove();
|
||||
loadintT.style.display = ""
|
||||
updateLabView(0.1);
|
||||
}, 1 * 1000)
|
||||
|
||||
window.timer = null;
|
||||
window.tempSeconds = 1;
|
||||
window.loadData = {};
|
||||
loadData.completedCount = 0;
|
||||
loadData.totalCount = 0;
|
||||
|
||||
// onload();
|
||||
// function onload() {
|
||||
// var winHeight = document.documentElement.clientHeight;
|
||||
// document.getElementById("canvasDiv").style.height = winHeight+"px";
|
||||
// };
|
||||
window.onload =function() {
|
||||
document.getElementById("block-Box").style.display = "none";
|
||||
}
|
||||
|
||||
function updateLabView(t) {
|
||||
if (timer != null) {
|
||||
clearInterval(timer);
|
||||
}
|
||||
timer = setInterval(function () {
|
||||
tempSeconds++;
|
||||
actualTotal();
|
||||
var loadintT = document.getElementById("loadingText")
|
||||
if(!loadintT){
|
||||
// clearInterval(timer);
|
||||
return;
|
||||
}
|
||||
|
||||
loadintT.innerHTML = 'loading......' + parseInt(tempSeconds) + '%';
|
||||
|
||||
switch (tempSeconds) {
|
||||
case 20:
|
||||
updateLabView(0.2);
|
||||
break;
|
||||
case 40:
|
||||
updateLabView(0.3);
|
||||
break;
|
||||
case 60:
|
||||
updateLabView(0.4);
|
||||
break;
|
||||
case 96:
|
||||
updateLabView(5);
|
||||
break;
|
||||
case 97:
|
||||
updateLabView(10);
|
||||
break;
|
||||
case 98:
|
||||
updateLabView(50);
|
||||
break;
|
||||
case 99:
|
||||
updateLabView(100);
|
||||
break;
|
||||
default:
|
||||
if (tempSeconds >= 80 && tempSeconds < 96) {
|
||||
updateLabView(t + 0.1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (tempSeconds > 100) {
|
||||
clearInterval(timer);
|
||||
tempSeconds = 100
|
||||
loadintT.innerHTML = 'loading......' + parseInt(tempSeconds) + '%';
|
||||
}
|
||||
}, t * 1000);
|
||||
}
|
||||
|
||||
function actualTotal() {
|
||||
var percent = parseInt(100 * loadData.completedCount / loadData.totalCount);
|
||||
if (percent > tempSeconds && loadData.totalCount > 1) {
|
||||
tempSeconds = percent;
|
||||
}
|
||||
}
|
||||
|
||||
function finishLoad(){
|
||||
clearInterval(timer);
|
||||
loadintT.innerHTML = 'loading......100' + '%';
|
||||
setTimeout(function(){
|
||||
loadintT.remove();
|
||||
},0.1 * 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="src/settings.js" charset="utf-8"></script>
|
||||
|
||||
<script src="main.js" charset="utf-8"></script>
|
||||
<!-- 果盘合合 -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
(function () {
|
||||
// open web debugger console
|
||||
if (typeof VConsole !== 'undefined') {
|
||||
window.vConsole = new VConsole();
|
||||
}
|
||||
|
||||
var debug = window._CCSettings.debug;
|
||||
var splash = document.getElementById('splash');
|
||||
splash.style.display = 'block';
|
||||
|
||||
function loadScript (moduleName, cb) {
|
||||
function scriptLoaded () {
|
||||
document.body.removeChild(domScript);
|
||||
domScript.removeEventListener('load', scriptLoaded, false);
|
||||
cb && cb();
|
||||
};
|
||||
var domScript = document.createElement('script');
|
||||
domScript.async = true;
|
||||
domScript.src = moduleName;
|
||||
domScript.addEventListener('load', scriptLoaded, false);
|
||||
document.body.appendChild(domScript);
|
||||
}
|
||||
|
||||
loadScript(debug ? 'cocos2d-js.js' : 'cocos2d-js-min.js', function () {
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
loadScript(debug ? 'physics.js' : 'physics-min.js', window.boot);
|
||||
}
|
||||
else {
|
||||
window.boot();
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
164
main.js
Normal file
@ -0,0 +1,164 @@
|
||||
var loadingNum = 0;
|
||||
window.boot = function () {
|
||||
var settings = window._CCSettings;
|
||||
window._CCSettings = undefined;
|
||||
var onProgress = null;
|
||||
|
||||
var RESOURCES = cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
var INTERNAL = cc.AssetManager.BuiltinBundleName.INTERNAL;
|
||||
var MAIN = cc.AssetManager.BuiltinBundleName.MAIN;
|
||||
|
||||
|
||||
function setLoadingDisplay () {
|
||||
// Loading splash scene
|
||||
var splash = document.getElementById('splash');
|
||||
var loadintT = document.getElementById("loadingText")
|
||||
// var progressBar = splash.querySelector('.progress-bar span');
|
||||
cc.loader.onProgress = function (finish, total, item) {
|
||||
loadData.completedCount = finish;
|
||||
loadData.totalCount = total;
|
||||
|
||||
var percent = 100 * finish / total;
|
||||
if(loadingNum >= 1 && total > 1){
|
||||
if(percent.toFixed(0) >= 100){
|
||||
loadintT.innerHTML = 'loading......100' + '%';
|
||||
clearInterval(timer);
|
||||
setTimeout(function(){
|
||||
loadintT.remove();
|
||||
},0.1 * 1000);
|
||||
}
|
||||
}
|
||||
loadingNum++;
|
||||
};
|
||||
splash.style.display = 'block';
|
||||
// progressBar.style.width = '0%';
|
||||
|
||||
cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, function () {
|
||||
splash.style.display = 'none';
|
||||
});
|
||||
}
|
||||
|
||||
var onStart = function () {
|
||||
|
||||
cc.view.enableRetina(true);
|
||||
cc.view.resizeWithBrowserSize(true);
|
||||
|
||||
if (cc.sys.isBrowser) {
|
||||
setLoadingDisplay();
|
||||
}
|
||||
|
||||
if (cc.sys.isMobile) {
|
||||
if (settings.orientation === 'landscape') {
|
||||
cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE);
|
||||
}
|
||||
else if (settings.orientation === 'portrait') {
|
||||
cc.view.setOrientation(cc.macro.ORIENTATION_PORTRAIT);
|
||||
}
|
||||
// cc.view.enableAutoFullScreen([
|
||||
// cc.sys.BROWSER_TYPE_BAIDU,
|
||||
// cc.sys.BROWSER_TYPE_BAIDU_APP,
|
||||
// cc.sys.BROWSER_TYPE_WECHAT,
|
||||
// cc.sys.BROWSER_TYPE_MOBILE_QQ,
|
||||
// cc.sys.BROWSER_TYPE_MIUI,
|
||||
// cc.sys.BROWSER_TYPE_HUAWEI,
|
||||
// cc.sys.BROWSER_TYPE_UC,
|
||||
// ].indexOf(cc.sys.browserType) < 0);
|
||||
cc.view.enableAutoFullScreen(false);
|
||||
}
|
||||
|
||||
// Limit downloading max concurrent task to 2,
|
||||
// more tasks simultaneously may cause performance draw back on some android system / browsers.
|
||||
// You can adjust the number based on your own test result, you have to set it before any loading process to take effect.
|
||||
if (cc.sys.isBrowser && cc.sys.os === cc.sys.OS_ANDROID) {
|
||||
cc.assetManager.downloader.maxConcurrency = 2;
|
||||
cc.assetManager.downloader.maxRequestsPerFrame = 2;
|
||||
}
|
||||
|
||||
var launchScene = settings.launchScene;
|
||||
var bundle = cc.assetManager.bundles.find(function (b) {
|
||||
return b.getSceneInfo(launchScene);
|
||||
});
|
||||
var canvas;
|
||||
if (cc.sys.isBrowser) {
|
||||
canvas = document.getElementById('GameCanvas');
|
||||
}
|
||||
|
||||
var MainManger = __require("MainManage");
|
||||
MainManger.init(launchScene,cc.sys.isBrowser,canvas.style.visibility);
|
||||
// bundle.loadScene(launchScene, null, onProgress,
|
||||
// function (err, scene) {
|
||||
// if (!err) {
|
||||
// cc.director.runSceneImmediate(scene);
|
||||
// if (cc.sys.isBrowser) {
|
||||
// // show canvas
|
||||
// var canvas = document.getElementById('GameCanvas');
|
||||
// canvas.style.visibility = '';
|
||||
// var div = document.getElementById('GameDiv');
|
||||
// if (div) {
|
||||
// div.style.backgroundImage = '';
|
||||
// }
|
||||
// console.log('Success to load scene: ' + launchScene);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
};
|
||||
|
||||
var option = {
|
||||
id: 'GameCanvas',
|
||||
debugMode: settings.debug ? cc.debug.DebugMode.INFO : cc.debug.DebugMode.ERROR,
|
||||
showFPS: settings.debug,
|
||||
frameRate: 60,
|
||||
groupList: settings.groupList,
|
||||
collisionMatrix: settings.collisionMatrix,
|
||||
};
|
||||
|
||||
cc.assetManager.init({
|
||||
bundleVers: settings.bundleVers,
|
||||
remoteBundles: settings.remoteBundles,
|
||||
server: settings.server
|
||||
});
|
||||
|
||||
var bundleRoot = [INTERNAL];
|
||||
settings.hasResourcesBundle && bundleRoot.push(RESOURCES);
|
||||
|
||||
var count = 0;
|
||||
function cb (err) {
|
||||
if (err) return console.error(err.message, err.stack);
|
||||
count++;
|
||||
if (count === bundleRoot.length + 1) {
|
||||
cc.assetManager.loadBundle(MAIN, function (err) {
|
||||
if (!err) cc.game.run(option, onStart);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
cc.assetManager.loadScript(settings.jsList.map(function (x) { return 'src/' + x;}), cb);
|
||||
|
||||
for (var i = 0; i < bundleRoot.length; i++) {
|
||||
cc.assetManager.loadBundle(bundleRoot[i], cb);
|
||||
}
|
||||
};
|
||||
|
||||
if (window.jsb) {
|
||||
var isRuntime = (typeof loadRuntime === 'function');
|
||||
if (isRuntime) {
|
||||
require('src/settings.js');
|
||||
require('src/cocos2d-runtime.js');
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
require('src/physics.js');
|
||||
}
|
||||
require('jsb-adapter/engine/index.js');
|
||||
}
|
||||
else {
|
||||
require('src/settings.js');
|
||||
require('src/cocos2d-jsb.js');
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
require('src/physics.js');
|
||||
}
|
||||
require('jsb-adapter/jsb-engine.js');
|
||||
}
|
||||
|
||||
cc.macro.CLEANUP_IMAGE_CACHE = true;
|
||||
window.boot();
|
||||
}
|
BIN
res/loading.gif
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
res/share.png
Normal file
After Width: | Height: | Size: 27 KiB |
1
settings.js
Normal file
@ -0,0 +1 @@
|
||||
window._CCSettings={platform:"web-mobile",groupList:["default","move","UI","fish"],collisionMatrix:[[true,true,true,true],[true,true,null,true],[true,false,false],[true,true,false,false]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Scene/MainGameScene.fire",orientation:"portrait",jsList:[],bundleVers:{internal:"803f8",resources:"93f29",main:"fbdd2"}};
|
BIN
singleColor.png
Normal file
After Width: | Height: | Size: 82 B |
1
src/settings.js
Normal file
@ -0,0 +1 @@
|
||||
window._CCSettings={platform:"web-mobile",groupList:["default","move","UI","fish"],collisionMatrix:[[true,true,true,true],[true,true,null,true],[true,false,false],[true,true,false,false]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Scene/MainGameScene.fire",orientation:"portrait",jsList:[],bundleVers:{internal:"803f8",resources:"93f29",main:"fbdd2"}};
|
127
style-mobile.css
Normal file
@ -0,0 +1,127 @@
|
||||
html {
|
||||
-ms-touch-action: none;
|
||||
}
|
||||
|
||||
body, canvas, div {
|
||||
display: block;
|
||||
outline: none;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/* Remove spin of input type number */
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
/* display: none; <- Crashes Chrome on hover */
|
||||
-webkit-appearance: none;
|
||||
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
|
||||
}
|
||||
|
||||
body {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
|
||||
cursor: default;
|
||||
color: #888;
|
||||
background-color: #333;
|
||||
|
||||
text-align: center;
|
||||
font-family: Helvetica, Verdana, Arial, sans-serif;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
/* fix bug: https://github.com/cocos-creator/2d-tasks/issues/791 */
|
||||
/* overflow cannot be applied in Cocos2dGameContainer,
|
||||
otherwise child elements will be hidden when Cocos2dGameContainer rotated 90 deg */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#Cocos2dGameContainer {
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-align: center;
|
||||
-webkit-box-pack: center;
|
||||
}
|
||||
|
||||
canvas {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
a:active, a:hover {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
p.header {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
p.footer {
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
#splash {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #ffffff url(./singleColor.png) no-repeat center;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
background-color: #1a1a1a;
|
||||
position: absolute;
|
||||
left: 25%;
|
||||
top: 80%;
|
||||
height: 15px;
|
||||
padding: 5px;
|
||||
width: 50%;
|
||||
/*margin: 0 -175px; */
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
|
||||
}
|
||||
|
||||
.progress-bar span {
|
||||
display: block;
|
||||
height: 100%;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
|
||||
transition: width .4s ease-in-out;
|
||||
background-color: #34c2e3;
|
||||
}
|
||||
|
||||
.stripes span {
|
||||
background-size: 30px 30px;
|
||||
background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
|
||||
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
|
||||
transparent 75%, transparent);
|
||||
|
||||
animation: animate-stripes 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes animate-stripes {
|
||||
0% {background-position: 0 0;} 100% {background-position: 60px 0;}
|
||||
}
|