浏览代码

feature: make kite fly away if kid cant catch

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

+ 5 - 3
js/games/circleOne.js

@@ -1001,9 +1001,11 @@ const circleOne = {
     },
     animateKiteHandler: function () {
       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) {
         const kiteMovement = self.animation.counter % 80 === 0 ? -3 : 3;
         self.kite.y += kiteMovement;