|
@@ -52,6 +52,7 @@ export class TornadoAIComponent extends TornadoComponent {
|
|
|
private initAIPlayer() {
|
|
|
const aiConfig = PlayerMgr.inst.getRandomAIConfig();
|
|
|
// console.log(aiConfig.data);
|
|
|
+ if (!aiConfig || !aiConfig.data) return;
|
|
|
//text:名称 range:检测半径 move_juge:移动概率 move_time:移动时间 escape_time:逃跑时间 pursuit_1:追击玩家概率 pursuit_2:追击AI概率 pursuit_time:追击时间
|
|
|
const { ange, move_judge, move_time, escape_time, pursuit_1, pursuit_2, pursuit_time } = aiConfig.data;
|
|
|
let text = PlayerMgr.inst.generateUniqueName(20);
|
|
@@ -237,7 +238,7 @@ export class TornadoAIComponent extends TornadoComponent {
|
|
|
/** 追击目标 */
|
|
|
private chaseTarget(target: Node) {
|
|
|
if (this.isChasing) return;
|
|
|
- console.log(`AI 追击目标-> ${target.name}}`);
|
|
|
+ // console.log(`AI 追击目标-> ${target.name}}`);
|
|
|
|
|
|
this.isChasing = true;
|
|
|
this.targetNode = target;
|