Просмотр исходного кода

Primeiro commit - código inicial do iFrações

prislalima 1 месяц назад
Родитель
Сommit
56e75afd26
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      js/screens/map.js

+ 7 - 0
js/screens/map.js

@@ -180,7 +180,9 @@ const mapState = {
       navigation.add.left(['back', 'menu'], 'customMenu');
     }
 
+    
     game.event.add('click', this.onInputDown);
+   
     game.event.add('mousemove', this.onInputOver);
   },
 
@@ -246,6 +248,11 @@ const mapState = {
     const x = game.math.getMouse(mouseEvent).x;
     const y = game.math.getMouse(mouseEvent).y;
 
+    if (!self.waitUserAction) {
+      navigation.onInputDown(x, y);
+    return;
+  }
+
     if (game.math.isOverIcon(x, y, self.continueButton)) {
       if (audioStatus) game.audio.popSound.play();
       self.loadGame();