diff options
author | Aki <nthirtyone@gmail.com> | 2016-05-13 21:58:57 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-05-13 21:58:57 +0200 |
commit | 35be9645afbc83146a8e0b7d5d52dcafd136d1d8 (patch) | |
tree | e69665a207c98bd024840e3d8d42af1dd2a1293c | |
parent | 14d7e5e8d94059c377214b578253e75157db3cd7 (diff) | |
download | roflnauts-35be9645afbc83146a8e0b7d5d52dcafd136d1d8.zip roflnauts-35be9645afbc83146a8e0b7d5d52dcafd136d1d8.tar.gz roflnauts-35be9645afbc83146a8e0b7d5d52dcafd136d1d8.tar.bz2 |
Scale fix
-rw-r--r-- | camera.lua | 10 | ||||
-rw-r--r-- | conf.lua | 3 | ||||
-rw-r--r-- | main.lua | 10 |
3 files changed, 8 insertions, 15 deletions
@@ -30,17 +30,9 @@ function Camera:setPosition (x, y) self.x, self.y = x, y end --- Add follow position -function Camera:addFollow (x, y, w) - local w = 1 - if x ~= nil and y ~= nil then - table.insert(self.follow, {["x"] = x, ["y"] = y, ["w"] = w}) - end -end - -- Move follow function Camera:moveFollow () - local x,y,i = 145, 120, 1 + local x,y,i = 105, 120, 1 for k,point in pairs(Nauts) do i = i + 1 x = math.max(math.min(point.body:getX(),290),0) + x @@ -1,7 +1,8 @@ function love.conf(t) t.title = "notnauts" t.version = "0.10.1" + t.window.icon = "assets/icon.png" t.window.width = 1260 t.window.height = 800 - t.console = true + t.console = false end
\ No newline at end of file @@ -19,10 +19,10 @@ function love.load () -- Platforms (`Ground`) Platforms = {} - table.insert(Platforms, Ground:new(world, 290/2, 180/2, {-91,0, 90,0, 90,10, 5,76, -5,76, -91,10}, "assets/platform_big.png")) - table.insert(Platforms, Ground:new(world, 290/2+140, 180/2+50, {-26,0, 26,0, 26,30, -26,30}, "assets/platform_small.png")) - table.insert(Platforms, Ground:new(world, 290/2-140, 180/2+50, {-26,0, 26,0, 26,30, -26,30}, "assets/platform_small.png")) - table.insert(Platforms, Ground:new(world, 290/2, 180/2-50, {-17,0, 17,0, 17,17, -17,17}, "assets/platform_top.png")) + table.insert(Platforms, Ground:new(world, 290/2, 180/2, {-91,1, 90,1, 90,10, 5,76, -5,76, -91,10}, "assets/platform_big.png")) + table.insert(Platforms, Ground:new(world, 290/2+140, 180/2+50, {-26,1, 26,1, 26,30, -26,30}, "assets/platform_small.png")) + table.insert(Platforms, Ground:new(world, 290/2-140, 180/2+50, {-26,1, 26,1, 26,30, -26,30}, "assets/platform_small.png")) + table.insert(Platforms, Ground:new(world, 290/2, 180/2-50, {-17,1, 17,1, 17,17, -17,17}, "assets/platform_top.png")) -- Nauts (`Player`) Nauts = {} @@ -59,7 +59,7 @@ function love.keypressed (key) end -- if key == "z" then - camera.scale = (camera.scale % 2) + 1 + camera.scale = (camera.scale % 4) + 1 end -- Players for k,naut in pairs(Nauts) do |