Explorar el Código

feat: adjust description game and add win game validation

priscila.snl hace 2 semanas
padre
commit
6b15cc0951
Se han modificado 7 ficheros con 12 adiciones y 7 borrados
  1. 1 1
      assets/lang/en_US
  2. 1 1
      assets/lang/es_ES
  3. 1 1
      assets/lang/fr_FR
  4. 1 1
      assets/lang/it_IT
  5. 1 1
      assets/lang/pt_BR
  6. 1 1
      js/games/squareOne.js
  7. 6 1
      js/games/squareTwo.js

+ 1 - 1
assets/lang/en_US

@@ -98,7 +98,7 @@ label_description=Show fractions next to the figures
 info_description=Learn more
 s1_challenge_title=Level Challenge!
 s1_challenge_subtitle=Can you figure it out?\nThe tractor will carry these blocks to a hole in the ground...
-s1_challenge_question=What should be\nthe size\nof the hole?
+s1_challenge_question=What should be the size\nof the hole to use\nall the blocks?
 s1_challenge_question_b=How many blocks\nare needed to fill\nthe hole in the ground?
 s1_challenge_accept=Accept the Challenge
 s1_blocks_label=Blocks to carry:

+ 1 - 1
assets/lang/es_ES

@@ -98,7 +98,7 @@ label_description=Mostrar fracciones al lado de las figuras
 info_description=Saber más
 s1_challenge_title=¡Desafío de la Fase!
 s1_challenge_subtitle=¿Puedes descubrirlo?\nEl tractor llevará estos bloques a un agujero en el suelo...
-s1_challenge_question=¿Cuál debe ser\nel tamaño\ndel agujero?
+s1_challenge_question=¿Cuál debe ser el tamaño\ndel agujero para utilizar\ntodos los bloques?
 s1_challenge_question_b=¿Cuántos bloques son\nnecesarios para cubrir\nel agujero en el suelo?
 s1_challenge_accept=Aceptar el Desafío
 s1_blocks_label=Bloques a cargar:

+ 1 - 1
assets/lang/fr_FR

@@ -98,7 +98,7 @@ label_description=Afficher les fractions à côté des figures
 info_description=En savoir plus
 s1_challenge_title=Défi du Niveau !
 s1_challenge_subtitle=Tu peux le découvrir ?\nLe tracteur va transporter ces blocs vers un trou dans le sol...
-s1_challenge_question=Quelle doit être\nla taille\ndu trou ?
+s1_challenge_question=Quelle doit être la taille\ndu trou pour utiliser\ntous les blocs ?
 s1_challenge_question_b=Combien de blocs\nsont nécessaires pour couvrir\nle trou dans le sol ?
 s1_challenge_accept=Accepter le Défi
 s1_blocks_label=Blocs à transporter :

+ 1 - 1
assets/lang/it_IT

@@ -98,7 +98,7 @@ label_description=Mostra le frazioni accanto alle figure
 info_description=Scopri di più
 s1_challenge_title=Sfida del Livello!
 s1_challenge_subtitle=Riesci a scoprirlo?\nIl trattore porterà questi blocchi a un buco nel terreno...
-s1_challenge_question=Quale deve essere\nla dimensione\ndel buco?
+s1_challenge_question=Quale deve essere la dimensione\ndel buco per utilizzare\ntutti i blocchi?
 s1_challenge_question_b=Quanti blocchi sono\nnecessari per riempire\nil buco nel terreno?
 s1_challenge_accept=Accetta la Sfida
 s1_blocks_label=Blocchi da trasportare:

+ 1 - 1
assets/lang/pt_BR

@@ -98,7 +98,7 @@ info_description=Saiba mais
 s2_challenge_accept=Aceitar o Desafio
 s1_challenge_title=Desafio da Fase!
 s1_challenge_subtitle=Você consegue descobrir?\nO trator vai carregar esses blocos para um buraco no chão...
-s1_challenge_question=Qual deve ser\no tamanho\ndo buraco?
+s1_challenge_question=Qual deve ser o tamanho\ndo buraco para utilizar\ntodos os blocos?
 s1_challenge_question_b=Quantos blocos são\nnecessários para cobrir\no buraco no chão?
 s1_challenge_accept=Aceitar o Desafio
 s1_blocks_label=Blocos a carregar:

+ 1 - 1
js/games/squareOne.js

@@ -616,7 +616,7 @@ const squareOne = {
 
       // Question text: use \n from lang file directly
       const questionWrapped = withNewlines(
-        gameMode === 'a' ? (game.lang.s1_challenge_question_b || game.lang.s1_challenge_question) : game.lang.s1_challenge_question
+        gameMode === 'b' ? (game.lang.s1_challenge_question_b || game.lang.s1_challenge_question) : game.lang.s1_challenge_question
       );
       const qLines = questionWrapped.split('\n').length;
       const qFontSize = qLines === 3 ? 30 : qLines > 3 ? 26 : 32;

+ 6 - 1
js/games/squareTwo.js

@@ -991,7 +991,12 @@ const squareTwo = {
       game.add.text(cx, bodyY + 84, line2, bodyStyleNormal);
       game.add.text(cx, bodyY + 122, line3, bodyStyleNormal);
 
-      // 5. Continue button
+      // 5. Checkmark top-right
+      const checkScale = imgH * 0.13 / 256;
+      const checkImg = game.add.image(cardLeft + imgW - 16, cardTop + 16, 'answer_correct', checkScale);
+      checkImg.anchor(1, 0);
+
+      // 6. Continue button
       const btnW = 400; const btnH = 75; const btnCenterY = cardBottom - 62;
       self.ui.explanation.button = game.add.geom.rect(
         cx - btnW / 2, btnCenterY - btnH / 2, btnW, btnH, colors.green