Commit 5beeea38 authored by haiyoucuv's avatar haiyoucuv

init

parent 26a1afce
......@@ -199,7 +199,7 @@
"_priority": 40000,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 739.6666666666667,
"_orthoHeight": 680.0634081902245,
"_near": 0,
"_far": 2000,
"_color": {
......@@ -2957,7 +2957,7 @@
"_priority": 50000,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 739.6666666666667,
"_orthoHeight": 680.0634081902245,
"_near": 1,
"_far": 2000,
"_color": {
......@@ -11995,7 +11995,7 @@
"y": 180,
"z": 0
},
"_id": "71cBYjiyBC36QSUvlytf6i"
"_id": "aePAr05wVAJYg2T0nMa/50"
},
{
"__type__": "cc.UITransform",
......@@ -12017,7 +12017,7 @@
"x": 0,
"y": 1
},
"_id": "3d0ooYTKVK+KprJ3/QFThZ"
"_id": "36FfbatLpLAL1nXmtxM48U"
},
{
"__type__": "cc.Sprite",
......@@ -12053,7 +12053,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "7fk2ur7oVKB738C6vJ9Rxe"
"_id": "35K56ro41OvqRt/SA0k9OR"
},
{
"__type__": "cc.Node",
......@@ -12101,7 +12101,7 @@
"y": 0,
"z": 0
},
"_id": "278XQ9DEdG2IfG+AZf1pVE"
"_id": "fdjULkd0NLdLWMY/g7QB5L"
},
{
"__type__": "cc.UITransform",
......@@ -12123,7 +12123,7 @@
"x": 0,
"y": 1
},
"_id": "89Vld3lX9CZqXQ9khgB7jL"
"_id": "80OdiNGyJMlaJnDaPzXBQv"
},
{
"__type__": "cc.Sprite",
......@@ -12159,7 +12159,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "f9V1rdg25LP5ll4/NvP3Y1"
"_id": "db8rXboQBEwrD4jIjwsp0e"
},
{
"__type__": "cc.Node",
......@@ -12207,7 +12207,7 @@
"y": 0,
"z": 0
},
"_id": "a4oOHxII5EP7VPrKl/AEEA"
"_id": "5d4ynpBDlGM6ix9RaXdZv0"
},
{
"__type__": "cc.UITransform",
......@@ -12229,7 +12229,7 @@
"x": 0,
"y": 1
},
"_id": "55YyMusHBAlacmmnY7/lPk"
"_id": "bf6WQEIaNGxZMVBy0lZHi0"
},
{
"__type__": "cc.Sprite",
......@@ -12265,7 +12265,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "5caQAUJvhBXZtNyPlKq2WT"
"_id": "32rmRD+3NO86C0q9vFud+x"
},
{
"__type__": "cc.UITransform",
......@@ -14230,7 +14230,9 @@
"skin2": {
"__uuid__": "27c9d52e-b689-416e-8ede-c05426bc84d1@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
"node1": null,
"node2": null
},
{
"__type__": "SkinNode",
......@@ -14259,7 +14261,9 @@
"skin2": {
"__uuid__": "74a063d4-c431-4590-a6de-9835912921c7@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
"node1": null,
"node2": null
},
{
"__type__": "SkinNode",
......@@ -14288,7 +14292,9 @@
"skin2": {
"__uuid__": "16452795-1491-434a-8901-751a0d935ee0@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
"node1": null,
"node2": null
},
{
"__type__": "SkinNode",
......@@ -14317,7 +14323,9 @@
"skin2": {
"__uuid__": "e4bdc6d8-34a6-42f2-8f0b-3c187cef1ae5@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
"node1": null,
"node2": null
},
{
"__type__": "SkinNode",
......@@ -14346,7 +14354,9 @@
"skin2": {
"__uuid__": "80cd8725-fbbc-420d-85b5-0b8d7ac170c8@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
"node1": null,
"node2": null
},
{
"__type__": "SkinNode",
......@@ -14375,7 +14385,9 @@
"skin2": {
"__uuid__": "29d74cba-d538-412e-a25a-39fe066e43d8@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
"node1": null,
"node2": null
},
{
"__type__": "SkinNode",
......@@ -14404,7 +14416,9 @@
"skin2": {
"__uuid__": "29d74cba-d538-412e-a25a-39fe066e43d8@f9941",
"__expectedType__": "cc.SpriteFrame"
}
},
"node1": null,
"node2": null
},
{
"__type__": "cc.Node",
......
......@@ -68,6 +68,8 @@ export class AISnake extends Snake {
turnSpeed: 0,
};
initFlag = false;
onLoad() {
super.onLoad();
const {
......@@ -90,6 +92,13 @@ export class AISnake extends Snake {
difficultyParams.turnSpeed = math.lerp(2, 4.5, (difficulty - 1) / 4);
}
setInit() {
this.initFlag = true;
this.scheduleOnce(() => {
this.initFlag = false;
}, 3);
}
onEnable() {
super.onEnable();
......
......@@ -361,7 +361,8 @@ export class MainGame extends Scene {
skin.push("default_yellow");
}
node.getComponent(AISnake)?.init({
const aiSnake = node.getComponent(AISnake);
aiSnake?.init({
nickName: nickName,
tag: tag,
x, y,
......@@ -371,6 +372,7 @@ export class MainGame extends Scene {
angle: math.randomRange(0, 360),
skinName: skin[math.randomRangeInt(0, skin.length)]
});
aiSnake.setInit();
this.animalNode.addChild(node);
}
......
......@@ -22,6 +22,7 @@ import { ECard, EPropType } from "./Common/Enums";
import { Player } from "./Player";
import gameStore from "../../store/gameStore";
import { Target } from "./Components/Target";
import { AISnake } from "./AISnake";
const { ccclass, property } = _decorator;
......@@ -263,6 +264,10 @@ export class Snake extends Component {
return;
}
if ((otherCollider?.node?.parent?.getComponent(Snake)?.["initFlag"])){
return;
}
const playerTs = otherCollider?.node?.parent?.getComponent(Player);
if (playerTs) {
gameStore.gameInfo.killNum++;
......
......@@ -98,14 +98,14 @@
</style>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/src/assets/plugin/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/src/assets/plugin/declare-process.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/src/assets/plugin/SVGA.Lite.v2.1.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/src/assets/plugin/jszip.min.v3.10.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/src/assets/plugin/rem.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/src/assets/plugin/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/src/assets/plugin/declare-process.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/src/assets/plugin/SVGA.Lite.v2.1.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/src/assets/plugin/jszip.min.v3.10.1.js"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/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/1734614684954/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/custom.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/style.css" />-->
<!-- <link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/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/1734614684954/src/polyfills.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/src/system.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map -->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>-->
<!--<script src="https://yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/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/1734614684954/cocos-js/cc.js"}}
{"imports":{"cc":"//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/cocos-js/cc.js"}}
</script>
<script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1734614684954/index.js').catch(function (err) {
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1734662338301/index.js').catch(function (err) {
console.error(err);
})
</script>
......
......@@ -45,8 +45,8 @@
"progress": 1,
"state": "success",
"stage": "build",
"message": "2024-12-19 21:28:57 build success in 4 min 12 s!",
"detailMessage": "builder:build-project-total (251924ms)\r",
"message": "2024-12-20 10:40:07 build success in 1 min 9 s!",
"detailMessage": "builder:build-project-total (69205ms)\r",
"options": {
"name": "cocos-template-3d",
"server": "",
......@@ -109,7 +109,7 @@
"__version__": "1.3.8",
"logDest": "project://temp/builder/log/web-mobile2024-11-6 15-39.log"
},
"time": "2024-12-19 21:24:44",
"time": "2024-12-20 10:38:58",
"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