浏览代码

create debug namespace and update flag position

lairaalmas 2 年之前
父节点
当前提交
2ce163e09a
共有 2 个文件被更改,包括 34 次插入14 次删除
  1. 28 8
      js/globals.js
  2. 6 6
      js/preMenu.js

+ 28 - 8
js/globals.js

@@ -775,12 +775,32 @@ let gameFrame = function () {
 };
 
 // For debug
-const debugGrid = function () {
-  const grid = 12;
-  const h = 1920 / (grid + 0.5);
-  const v = 1080 / (grid + 0.5);
-  for (let i = 0; i < grid; i++) {
-    game.add.geom.rect(h / 2 + i * h, 0, h / 2, 1080, '', 0, colors.blue, 0.3);
-    game.add.geom.rect(0, v / 2 + i * v, 1920, v / 2, '', 0, colors.blue, 0.3);
-  }
+const debug = {
+  grid: function () {
+    const grid = 2;
+    const h = 1920 / (grid + 0.5);
+    const v = 1080 / (grid + 0.5);
+    for (let i = 0; i < grid; i++) {
+      game.add.geom.rect(
+        h / 2 + i * h,
+        0,
+        h / 2,
+        1080,
+        '',
+        0,
+        colors.blue,
+        0.3
+      );
+      game.add.geom.rect(
+        0,
+        v / 2 + i * v,
+        1920,
+        v / 2,
+        '',
+        0,
+        colors.blue,
+        0.3
+      );
+    }
+  },
 };

+ 6 - 6
js/preMenu.js

@@ -84,14 +84,14 @@ const langState = {
     this.langs = {
       text: [
         'FRAÇÕES  ',
-        'FRAZIONI  ',
-        'FRACTIONS  ',
         'FRACCIONES  ',
         'FRACTIONS  ',
+        'FRACTIONS  ',
+        'FRAZIONI  ',
       ], // Language names
-      flag: ['flag_BR', 'flag_IT', 'flag_US', 'flag_PE', 'flag_FR'], // Icon names
-      lang: ['pt_BR', 'it_IT', 'en_US', 'es_PE', 'fr_FR'], // Parameters sent for language object
-      x: [-360, -360, -360, 160, 160],
+      flag: ['flag_BR', 'flag_PE', 'flag_FR', 'flag_US', 'flag_IT'], // Icon names
+      lang: ['pt_BR', 'es_PE', 'fr_FR', 'en_US', 'it_IT'], // Parameters sent for language object
+      x: [-350, -350, -350, 170, 170],
       y: [-220, 0, 220, -110, 110],
     };
 
@@ -108,7 +108,7 @@ const langState = {
       // Add icons for flags
       const flag = game.add.image(
         context.canvas.width / 2 + this.langs.x[i] + 100,
-        context.canvas.height / 2 + this.langs.y[i],
+        context.canvas.height / 2 + this.langs.y[i] - 13,
         this.langs.flag[i]
       );
       flag.anchor(0.5, 0.5);