|
@@ -49,6 +49,8 @@ export class TornadoAIComponent extends TornadoComponent {
|
|
|
this.attack = this.attributeBonusMgr.getStormSunderAttack(this.currentLv, true);
|
|
|
this.speed = this.attributeBonusMgr.getStormSunderSpeed(this.currentLv, true);
|
|
|
|
|
|
+ this.attack = 10000; //测试
|
|
|
+
|
|
|
console.log(`AI 攻击力:${this.attack} 速度:${this.speed} 下一级经验:${this.nextExp}`)
|
|
|
}
|
|
|
|
|
@@ -97,7 +99,6 @@ export class TornadoAIComponent extends TornadoComponent {
|
|
|
}, this.moveDuration);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
protected onTriggerEnter(event: ITriggerEvent): void {
|
|
|
// super.onTriggerEnter(event);
|
|
|
if (event.otherCollider.getGroup() === 1 << 2) {
|
|
@@ -117,12 +118,19 @@ export class TornadoAIComponent extends TornadoComponent {
|
|
|
const targetTornado = otherCollider.node.parent.getComponent(TornadoComponent);
|
|
|
if (!targetTornado) return;
|
|
|
|
|
|
- if (this.currentLv > targetTornado.currentLv) {
|
|
|
+ const isPlayer = targetTornado instanceof TornadoComponent;
|
|
|
+ if (this.currentLv > targetTornado.currentLv && isPlayer) {
|
|
|
GameMgr.inst.setGameStatus(GameStatus.End);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ protected addExpByKill() {
|
|
|
+ super.addExpByKill(true);
|
|
|
+
|
|
|
+ console.log(`AI 当前经验:${this.currentExp}`);
|
|
|
+ }
|
|
|
+
|
|
|
/** 触发器检测(过程中遇到其他龙卷风) */
|
|
|
protected onRadiusTriggerEnter(event: ITriggerEvent): void {
|
|
|
const otherCollider = event.otherCollider;
|