181404010226 5 mesiacov pred
rodič
commit
da3558ec0f

+ 4 - 4
assets/Scenes/GameLevel.scene

@@ -21174,8 +21174,8 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 310,
-      "y": -1231.5349999999999,
+      "x": 311.674,
+      "y": -1214.659,
       "z": 0
     },
     "_lrot": {
@@ -23794,9 +23794,9 @@
     "__prefab": null,
     "_alignFlags": 9,
     "_target": null,
-    "_left": 0,
+    "_left": 1.6739999999999782,
     "_right": 0,
-    "_top": 1047.0349999999999,
+    "_top": 1030.159,
     "_bottom": -1229.178,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,

+ 1 - 1
assets/scripts/CombatSystem/BlockManager.ts

@@ -480,7 +480,7 @@ export class BlockManager extends Component {
     
     // 处理方块放下
     handleBlockDrop(event: EventTouch) {
-        const touchPos = event.getUILocation();
+        const touchPos = event.getLocation();
         const startLocation = this.currentDragBlock['startLocation'];
         
         if (this.isInKuangArea(touchPos)) {

+ 1 - 0
assets/scripts/CombatSystem/EnemyController.ts

@@ -392,6 +392,7 @@ export class EnemyController extends BaseSingleton {
     // 暂停生成敌人
     public pauseSpawning(): void {
         if (this.gameStarted) {
+            console.log('暂停生成敌人');
             this.unschedule(this.spawnEnemy);
         }
     }

+ 13 - 4
assets/scripts/CombatSystem/SkillSelection/SkillButtonAnimator.ts

@@ -9,6 +9,15 @@ const { ccclass, property } = _decorator;
 @ccclass('SkillButtonAnimator')
 export class SkillButtonAnimator extends Component {
 
+    private _origScale: Vec3 = new Vec3();
+    private _origPos: Vec3 = new Vec3();
+
+    onLoad () {
+        // 记录初始位置、缩放,用于恢复
+        this._origScale.set(this.node.scale);
+        this._origPos.set(this.node.position);
+    }
+
     /**
      * 播放缩小并(可选)移动到指定目标位置的动画。
      * @param duration 动画时长(秒)
@@ -25,12 +34,12 @@ export class SkillButtonAnimator extends Component {
         tween(this.node)
             .to(duration, props, { easing: 'quadIn' })
             .call(() => {
-                this.node.active = false; // 动画结束后隐藏节点
-                if (onComplete) {
-                    onComplete();
-                }
+                // 动画结束后隐藏节点,但允许后续 resetState 恢复
+                this.node.active = false;
+                if (onComplete) onComplete();
             })
             .start();
+        this.node.setPosition(this._origPos);
     }
 }