bjorn 10 lat temu
rodzic
commit
930f5d6290
1 zmienionych plików z 5 dodań i 3 usunięć
  1. 5 3
      map.lua

+ 5 - 3
map.lua

@@ -57,17 +57,19 @@ function Map:draw()
   g.rectangle('fill', 0, 0, self.width, self.height)
 
   g.setColor(255, 255, 255)
-  local image = data.media.graphics.dinoland.background.leftBg1
+  local image = data.media.graphics.dinoland.background.sky
   local scale = (600) / image:getHeight()
+  g.draw(image, ctx.view.x, self.height, 0, scale, scale, 0, image:getHeight())
+
   local inc = image:getWidth() * scale
   for n = 4, 1, -1 do
     for x = 0, self.width, image:getWidth() * scale * 2 do
       image = data.media.graphics.dinoland.background['leftBg' .. n]
       local xx
       xx = (ctx.pigeon.body:getX() - 800) / (2 * math.min(n - 1, 3)) / 2
-      g.draw(image, xx, self.height, 0, scale, scale, 0, image:getHeight())
+      g.draw(image, x, self.height, 0, scale, scale, 0, image:getHeight())
       image = data.media.graphics.dinoland.background['rightBg' .. n]
-      g.draw(image, xx + inc, self.height, 0, scale, scale, 0, image:getHeight())
+      g.draw(image, x + inc, self.height, 0, scale, scale, 0, image:getHeight())
     end
   end