Commit d75c53fe authored by haiyoucuv's avatar haiyoucuv

init

parent 199fcb8d
......@@ -562,19 +562,22 @@ export class Snake extends Component {
this.clearPropEffect()
const len = this.bodyArr.length;
const foodArr = this.bodyArr.map((body, i) => {
const foodArr = [];
for (let i = 0; i < len; i++) {
const body = this.bodyArr[i];
body.removeFromParent();
bodyPool.put(body);
if (body.position.x > 99999) return;
if (i % 2 == 1) return;
if (body.position.x > 99999) continue;
if (i % 2 == 1) continue;
return {
foodArr.push({
x: body.position.x + math.randomRange(-10, 10),
y: body.position.y + math.randomRange(-10, 10),
energy: ~~(this.energy / len),
};
});
});
}
this.bodyArr.length = 0;
FoodManger.ins.initFoods(foodArr);
......
......@@ -98,14 +98,14 @@
</style>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/src/assets/plugin/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/src/assets/plugin/declare-process.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/src/assets/plugin/SVGA.Lite.v2.1.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/src/assets/plugin/jszip.min.v3.10.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/src/assets/plugin/rem.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/src/assets/plugin/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/src/assets/plugin/declare-process.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/src/assets/plugin/SVGA.Lite.v2.1.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/src/assets/plugin/jszip.min.v3.10.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/src/assets/plugin/rem.min.js"></script>
<script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/custom.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/custom.css" />-->
<!-- <script src="//yun-duiba-credits-test.duibatest.com.cn/TNGD_GAMES/libs/eruda.min.js"></script>-->
<!-- <script>eruda.init()</script>-->
......@@ -118,20 +118,20 @@
</div>
<!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/src/polyfills.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/src/system.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<script type="systemjs-importmap" charset="utf-8">
{"imports":{"cc":"//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/cocos-js/cc.js"}}
{"imports":{"cc":"//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/cocos-js/cc.js"}}
</script>
<script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924096505/index.js').catch(function (err) {
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1734924937956/index.js').catch(function (err) {
console.error(err);
})
</script>
......
......@@ -45,7 +45,7 @@
"progress": 1,
"state": "success",
"stage": "build",
"message": "2024-12-23 11:22:33 build success in 57 s!",
"message": "2024-12-23 11:36:22 build success in 44 s!",
"detailMessage": "refresh db internal success\r",
"options": {
"name": "cocos-template-3d",
......@@ -109,7 +109,7 @@
"__version__": "1.3.8",
"logDest": "project://temp/builder/log/web-mobile2024-11-6 15-39.log"
},
"time": "2024-12-23 11:21:36",
"time": "2024-12-23 11:35:37",
"dirty": false
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment