浏览代码

refactor: adjust logic for feedback message in mode b

lairaalmas 9 月之前
父节点
当前提交
0816616680
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      js/games/circleOne.js

+ 7 - 0
js/games/circleOne.js

@@ -530,6 +530,13 @@ const circleOne = {
         }
 
         finalPosition = balloonX;
+
+        self.blocks.list.forEach((cur) => {
+          self.utils.fillCurrentBlock(balloonX, cur.x, cur);
+          if (self.utils.isOverBlock(balloonX, cur.x, cur.width, cur))
+            self.blocks.cur = cur;
+        });
+
         // Restart if
         // In Game mode 'b' : Top circle position is out of bounds (when on the ground)
         if (gameOperation === 'minus') {