Sfoglia il codice sorgente

refactor: adjust logic for feedback message in mode b

lairaalmas 9 mesi fa
parent
commit
0816616680
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  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') {