fixed level jump

This commit is contained in:
2021-12-27 17:37:14 +01:00
parent e0ac6abaef
commit 3af5bbe928
3 changed files with 1 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ if os.getenv("LOCAL_LUA_DEBUGGER_VSCODE") == "1" then
function love.load()
love.window.setTitle('SpiderCut')
love.graphics.setDefaultFilter('nearest', 'nearest')
love.graphics.setLineJoin( "miter" )
love.graphics.setLineJoin( "bevel" )
math.randomseed(os.time())
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {

View File

@@ -8,17 +8,10 @@ function Level:init(stage)
self.segments = self:createLevel()
self.polygon = self:createPolygon()
self.mesh = poly2mesh(self.points)
end
function Level:update(dt)
-- print_r(self.points)
-- print(tostring(#self.points))
-- if self.mesh == nil and #self.points > 2 then
-- self.mesh = poly2mesh(self.points)
-- end
self.mesh = poly2mesh(self.points)
-- print_r(self.mesh:getVertices())
end
function Level:render()

View File

@@ -71,15 +71,6 @@ function PlayState:updateBalls(dt, level)
end
end
if #self.balls <= 0 then
-- game over - reset level
self:gameOver()
end
-- check perimeter of level, if low enough, create new level move on to the next stage
if level:getPerimeter() < 500 then
self:nextStage()
end
end
function PlayState:checkEndLevel (level)