Ver Fonte

feature: make kite fly away if kid cant catch

lairaalmas há 7 meses atrás
pai
commit
f9be8aef7e
1 ficheiros alterados com 5 adições e 3 exclusões
  1. 5 3
      js/games/circleOne.js

+ 5 - 3
js/games/circleOne.js

@@ -1001,9 +1001,11 @@ const circleOne = {
     },
     },
     animateKiteHandler: function () {
     animateKiteHandler: function () {
       self.animation.counter++;
       self.animation.counter++;
-      // self.kite.y -= 2;
-      // self.kite_line.y -= 2;
-      // if (self.control.isCorrect) self.kid.y -= 2;
+
+      if (!self.control.isCorrect) {
+        self.kite.y -= 2;
+        self.kite_line.y -= 2;
+      }
       if (self.animation.counter % 40 === 0) {
       if (self.animation.counter % 40 === 0) {
         const kiteMovement = self.animation.counter % 80 === 0 ? -3 : 3;
         const kiteMovement = self.animation.counter % 80 === 0 ? -3 : 3;
         self.kite.y += kiteMovement;
         self.kite.y += kiteMovement;