Browse Source

refator: adjust c1 ending animation so balloon stops when operation is shown

lairaalmas 1 year ago
parent
commit
867d1f908f
2 changed files with 10 additions and 9 deletions
  1. 7 6
      js/games/circleOne.js
  2. 3 3
      js/globals/globals_debug.js

+ 7 - 6
js/games/circleOne.js

@@ -872,13 +872,14 @@ const circleOne = {
       self.animation.animateBalloon = true;
     },
     animateBalloonHandler: function () {
-      self.animation.counter++;
-      self.balloon.y -= 2;
-      self.basket.y -= 2;
+      if (self.animation.counter < 130) {
+        self.animation.counter++;
+        self.balloon.y -= 2;
+        self.basket.y -= 2;
 
-      if (self.control.isCorrect) self.kid.y -= 2;
-
-      if (self.animation.counter === 100) {
+        if (self.control.isCorrect) self.kid.y -= 2;
+      }
+      if (self.animation.counter === 130) {
         self.utils.renderEndUI();
         self.control.showEndInfo = true;
 

+ 3 - 3
js/globals/globals_debug.js

@@ -3,11 +3,11 @@ const isDebugMode = true;
 const debugState = {
   lang: { skip: true, lang: 'pt_BR' },
   name: { skip: true, name: 'Username' },
-  menu: { skip: false, id: 1, audioStatus: false },
+  menu: { skip: true, id: 1, audioStatus: false },
   customMenu: {
-    skip: false,
+    skip: true,
     getData: () => {
-      return { mode: 'a', operation: 'plus', difficulty: 3, label: true };
+      return { mode: 'a', operation: 'plus', difficulty: 2, label: true };
     },
   },
   map: { skip: false },