Procházet zdrojové kódy

c1 fix floor places position when operation minus

lairaalmas před 1 rokem
rodič
revize
b1f6444fe0

+ 1 - 1
src/js/games/circleOne.js

@@ -76,7 +76,7 @@ const circleOne = {
     const y0 = this.road.y + 20;
     const x0 =
       gameOperation === 'minus'
-        ? this.road.x + 5 * distanceBetweenPoints - pointWidth / 2
+        ? context.canvas.width - this.road.x - pointWidth / 2
         : this.road.x + pointWidth / 2; // Initial 'x' coordinate for the kid and the baloon
 
     const diameter =

+ 1 - 1
src/js/globals/globals_debug.js

@@ -7,7 +7,7 @@ const debugState = {
   customMenu: {
     skip: true,
     getData: () => {
-      return { mode: 'b', operation: 'minus', difficulty: 2, label: true };
+      return { mode: 'b', operation: 'mixed', difficulty: 5, label: true };
     },
   },
   map: { skip: true },

+ 1 - 1
src/js/globals/globals_functions.js

@@ -293,7 +293,7 @@ const renderBackground = (type) => {
 
   if (type === 'farmRoad') {
     game.add.image(0, context.canvas.height - floorSize, 'floor_grass', 1.5);
-    for (let i = 1; i < context.canvas.width / floorSize; i++) {
+    for (let i = 1; i < context.canvas.width / floorSize - 1; i++) {
       game.add.image(
         i * floorSize,
         context.canvas.height - floorSize,