woso_javan vor 2 Monaten
Ursprung
Commit
a42306d8e1

+ 9 - 9
assets/module_storm_sunder/Script/Component/PropComponent.ts

@@ -112,7 +112,7 @@ export class PropComponent extends Component {
         if (isValid(this.node)) {
             const otherCollider = event.otherCollider.node;
             if (otherCollider.name == "RigibodyStorm") {
-                // this.shake();
+                this.shake();
             }
         }
     }
@@ -120,13 +120,13 @@ export class PropComponent extends Component {
     onTriggerExit(event: ITriggerEvent): void {
         Effect2DUIMgr.Instance.removeBlood(this.node);
 
-        // if (!this.isMove) {
-        //     const otherCollider = event.otherCollider.node;
-        //     if (otherCollider.name == "RigibodyStorm") {
-        //         Tween.stopAllByTarget(this.node);
-        //         this.isShaking = false;
-        //     }
-        // }
+        if (!this.isMove) {
+            const otherCollider = event.otherCollider.node;
+            if (otherCollider.name == "RigibodyStorm") {
+                // Tween.stopAllByTarget(this.node);
+                this.isShaking = false;
+            }
+        }
     }
 
     update(deltaTime: number) {
@@ -134,7 +134,7 @@ export class PropComponent extends Component {
     }
 
     protected onDestroy(): void {
-        Tween.stopAllByTarget(this.node);
+        // Tween.stopAllByTarget(this.node);
     }
 }
 

+ 7 - 7
assets/module_storm_sunder/Script/Component/TornadoAIComponent.ts

@@ -75,7 +75,7 @@ export class TornadoAIComponent extends TornadoComponent {
         this.speed = this.attributeBonusMgr.getStormSunderSpeed(this.currentLv, true);
         this.speed = Math.round((this.speed / 2) * 100) / 100;
         // this.speed = this.speed * 0.5;//测试
-        console.log(`移动时长:${this.moveDuration} 逃离时长:${this.escapeDuration} 追击时长:${this.chaseDuration} 追击AI概率:${this.chaseAIProbability} 追击玩家概率:${this.chasePlayerProbability} 移动概率:${this.moveProbability}`);
+        // console.log(`移动时长:${this.moveDuration} 逃离时长:${this.escapeDuration} 追击时长:${this.chaseDuration} 追击AI概率:${this.chaseAIProbability} 追击玩家概率:${this.chasePlayerProbability} 移动概率:${this.moveProbability}`);
     }
 
     /** 选择 AI 行为 */
@@ -84,7 +84,7 @@ export class TornadoAIComponent extends TornadoComponent {
 
         const move = Math.random() * 100 < this.moveProbability;
 
-        console.log(`AI 行为判断:移动概率:${this.moveProbability} 是否移动:${move}`);
+        // console.log(`AI 行为判断:移动概率:${this.moveProbability} 是否移动:${move}`);
         if (move) {
             this.randomMove();
         } else {
@@ -151,7 +151,7 @@ export class TornadoAIComponent extends TornadoComponent {
                 const isAI = targetTornado.ai;
                 if (this.currentLv > targetTornado.currentLv && !isAI) {
                     GameMgr.inst.isWin = false;
-                    console.log(`AI 触发碰撞到:${targetTornado.name} isAI:${isAI}`);
+                    // console.log(`AI 触发碰撞到:${targetTornado.name} isAI:${isAI}`);
                     GameMgr.inst.setGameStatus(GameStatus.Revive);
                 }
             }
@@ -213,13 +213,13 @@ 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;
 
         PathfindingManager.getInstance().followTarget(this, target, this.speed, () => {
-            console.log(`AI 追击目标到达`);
+            // console.log(`AI 追击目标到达`);
             this.cancelAction();
             this.decideAction();
         });
@@ -234,7 +234,7 @@ export class TornadoAIComponent extends TornadoComponent {
     /** 逃离目标 */
     private escapeFrom(target: Node) {
         this.isEscaping = true;
-        console.log(`AI 逃离行为 时长:${this.escapeDuration}`);
+        // console.log(`AI 逃离行为 时长:${this.escapeDuration}`);
 
         // 计算最大可逃离距离 = 速度 * 持续时间
         const maxDistance = this.speed * this.escapeDuration;
@@ -259,7 +259,7 @@ export class TornadoAIComponent extends TornadoComponent {
         this.isEscaping = false;
         this.targetNode = null;
         Tween.stopAllByTarget(this.node);
-        console.log(`AI 行为取消`);
+        // console.log(`AI 行为取消`);
     }
 
     protected onDestroy(): void {