woso_javan 3 months ago
parent
commit
c033eb860d
1 changed files with 8 additions and 9 deletions
  1. 8 9
      assets/module_take_goblet/Script/LevelAction.ts

+ 8 - 9
assets/module_take_goblet/Script/LevelAction.ts

@@ -29,8 +29,7 @@ export class LevelAction extends Component {
     goblets: Node = null!;  //原浆区
 
     private originCupPositions = new Map<string, Vec3>(); // 改用唯一ID记录
-    private isProcessing = false;
-    private isPouring = false; // 添加状态锁
+    private isProcessing = false; // 添加状态锁
     static instance: LevelAction; // 添加静态实例
 
     onLoad() {
@@ -158,11 +157,11 @@ export class LevelAction extends Component {
     }
 
     public async handlePourOriginCup(originCup: OriginCup) {
-        if (this.isPouring) {
-            tgxUITips.show('忙碌中...');
+        if (this.isProcessing) {
+            tgxUITips.show('我知道你很急,但你先别急!');
             return;
         }
-        this.isPouring = true;
+        this.isProcessing = true;
 
         try {
             // 如果子节点0是底层,需要反转顺序
@@ -232,14 +231,14 @@ export class LevelAction extends Component {
                 this.addWaitCupToOutArea();
             }
         } finally {
-            this.isPouring = false;
+            this.isProcessing = false;
         }
     }
 
     // 新增方法:处理暂存区倒水到调酒区
     private async handlePourTempCupToOutArea() {
-        if (this.isPouring) return;
-        this.isPouring = true;
+        if (this.isProcessing) return;
+        this.isProcessing = true;
 
         try {
             const tempCupsComp = this.tempCups.getComponent(TempCups)!;
@@ -275,7 +274,7 @@ export class LevelAction extends Component {
                 }
             }
         } finally {
-            this.isPouring = false;
+            this.isProcessing = false;
         }
     }