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

@@ -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)