Commit 3aaa6993 authored by haiyoucuv's avatar haiyoucuv

init

parent a0ce4989
......@@ -41,6 +41,15 @@ export class AISnake extends Snake {
private assistTarget: AISnake = null; // 正在协助的AI蛇
death() {
super.death();
this.node.removeFromParent();
this.destroy();
MainGame.ins.initAnimal(1);
}
private get difficultyParams() {
return {
reactionTime: math.lerp(0.8, 0.2, (this.difficulty - 1) / 4),
......@@ -560,7 +569,7 @@ export class AISnake extends Snake {
}
private executeEscaping() {
if (!this.escapeTarget) {
if (!this.escapeTarget?.isLife) {
// 如果没有特定的逃离目标,检查并避开所有潜在威胁
this.avoidAllThreats();
return;
......
This diff is collapsed.
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