Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0aeb0139d3 | |||
| 391e2ab1b7 | |||
| 3af5bbe928 | |||
| e0ac6abaef | |||
| 56ffd396bc |
@@ -10,6 +10,4 @@ Lua game inspired by an old arcade game(Qix/Gals Panic) using LOVE2D for Linux.
|
||||
|
||||
- Add more pictures (manga?)
|
||||
|
||||
- Fix Mesh
|
||||
|
||||
- Fix balls sometimes attaching to the lines
|
||||
|
||||
5
main.lua
5
main.lua
@@ -37,6 +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( "bevel" )
|
||||
math.randomseed(os.time())
|
||||
|
||||
push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {
|
||||
@@ -60,6 +61,10 @@ function love.keypressed(key)
|
||||
love.event.quit()
|
||||
end
|
||||
|
||||
if key == 'f' then
|
||||
push:switchFullscreen()
|
||||
end
|
||||
|
||||
love.keyboard.keysPressed[key] = true
|
||||
end
|
||||
|
||||
|
||||
36
src/Clock.lua
Normal file
36
src/Clock.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
Clock = Class {}
|
||||
|
||||
function Clock:init(timelimit, direction)
|
||||
self.timeLimit = timelimit
|
||||
self.direction = direction
|
||||
self.color = {56 / 255, 56 / 255, 56 / 255, 1}
|
||||
self.currentTime = "0"
|
||||
self.timer = 0
|
||||
self.startTime = self:getOsTime()
|
||||
end
|
||||
|
||||
function Clock:update(dt)
|
||||
local passed = math.floor((self:getOsTime() - self.startTime) * 10 + 0.5)
|
||||
if self.direction == 'down' then
|
||||
self.currentTime = tostring(self.timeLimit - passed)
|
||||
else
|
||||
self.currentTime = tostring(passed)
|
||||
end
|
||||
end
|
||||
|
||||
function Clock:render()
|
||||
if self.currentTime * 1 <= 10 then
|
||||
local a = math.abs(math.cos(love.timer.getTime() * .85 % 2 * math.pi))
|
||||
love.graphics.setColor(.8, .12, .12, a)
|
||||
else
|
||||
love.graphics.setColor(self.color[1], self.color[2], self.color[3],
|
||||
self.color[4])
|
||||
end
|
||||
love.graphics.setFont(gFonts['medium'])
|
||||
love.graphics.printf('Time: ' .. self.currentTime, 0, 5, VIRTUAL_WIDTH,
|
||||
'right')
|
||||
love.graphics.setFont(gFonts['small'])
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
end
|
||||
|
||||
function Clock:getOsTime() return os.clock() end
|
||||
@@ -10,6 +10,7 @@ Timer = require 'lib/knife.timer'
|
||||
require 'src/Animation'
|
||||
require 'src/constants'
|
||||
require 'src/StateMachine'
|
||||
require 'src/Clock'
|
||||
require 'src/Util'
|
||||
|
||||
require 'src/Level'
|
||||
|
||||
@@ -1,24 +1,17 @@
|
||||
-- require('mobdebug').start()
|
||||
Level = Class {}
|
||||
|
||||
function Level:init(stage)
|
||||
function Level:init(def, stage)
|
||||
self.stage = stage
|
||||
self.points = {}
|
||||
self.player = {}
|
||||
self.segments = self:createLevel()
|
||||
self.segments = self:createLevelFromDef(def, stage)
|
||||
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()
|
||||
@@ -38,6 +31,14 @@ function Level:renderBackground()
|
||||
end
|
||||
end
|
||||
|
||||
function Level:createLevelFromDef(def, stage)
|
||||
local level = {}
|
||||
for i, seg in pairs(def[1].segments) do
|
||||
table.insert(level, Segment(seg.p1, seg.p2, seg.width, seg.face) )
|
||||
end
|
||||
return level
|
||||
end
|
||||
|
||||
function Level:createLevel()
|
||||
local level = {
|
||||
[1] = Segment({LEVEL_RENDER_OFFSET, LEVEL_RENDER_OFFSET_TOP}, {
|
||||
|
||||
@@ -39,6 +39,7 @@ function Player:init(def, level )
|
||||
end
|
||||
|
||||
function Player:isMoveAllowed(point)
|
||||
point = {point[1] + self.width/2, point[2] + self.width/2}
|
||||
for i,segment in pairs (self.trailSegments) do
|
||||
if segment:pointInSegment(point) then
|
||||
return false
|
||||
|
||||
115
src/Segment.lua
115
src/Segment.lua
@@ -1,10 +1,9 @@
|
||||
-- require('mobdebug').start()
|
||||
|
||||
Segment = Class{}
|
||||
Segment = Class {}
|
||||
|
||||
local symbols = {['up'] = 207, ['down'] = 209, ['right'] = 199, ['left'] = 182}
|
||||
|
||||
function Segment:init(firstPoint, secondPoint,lineWidth, face, color)
|
||||
function Segment:init(firstPoint, secondPoint, lineWidth, face, color)
|
||||
self.firstPointX = firstPoint[1]
|
||||
self.firstPointY = firstPoint[2]
|
||||
self.secondPointX = secondPoint[1]
|
||||
@@ -14,15 +13,16 @@ function Segment:init(firstPoint, secondPoint,lineWidth, face, color)
|
||||
self.horizontal = self.firstPointY == self.secondPointY
|
||||
self.face = face or ''
|
||||
self.direction = self:calculateDirection()
|
||||
self.color = color or {r=255,g=255,b=255}
|
||||
self.color = color or {r = 255, g = 255, b = 255}
|
||||
end
|
||||
|
||||
function Segment:render()
|
||||
love.graphics.setColor(self.color.r,self.color.g, self.color.b,255)
|
||||
love.graphics.setColor(self.color.r, self.color.g, self.color.b, 1)
|
||||
love.graphics.setLineWidth(self.lineWidth)
|
||||
love.graphics.line(self.firstPointX,self.firstPointY,self.secondPointX, self.secondPointY)
|
||||
love.graphics.line(self.firstPointX, self.firstPointY, self.secondPointX,
|
||||
self.secondPointY)
|
||||
|
||||
love.graphics.setColor(255,255, 255, 255)
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
|
||||
-- debug
|
||||
-- love.graphics.setFont(gFonts['small'])
|
||||
@@ -31,14 +31,18 @@ function Segment:render()
|
||||
end
|
||||
|
||||
function Segment:segmentToPoints()
|
||||
return self.firstPointX, self.firstPointY, self.secondPointX, self.secondPointY
|
||||
return self.firstPointX, self.firstPointY, self.secondPointX,
|
||||
self.secondPointY
|
||||
end
|
||||
|
||||
function Segment:length()
|
||||
return math.sqrt( (self.secondPointX - self.firstPointX) * (self.secondPointX - self.firstPointX) + (self.secondPointY - self.firstPointY) * (self.secondPointY - self.firstPointY) )
|
||||
return math.sqrt((self.secondPointX - self.firstPointX) *
|
||||
(self.secondPointX - self.firstPointX) +
|
||||
(self.secondPointY - self.firstPointY) *
|
||||
(self.secondPointY - self.firstPointY))
|
||||
end
|
||||
|
||||
function Segment:sideOfSegment(x,y)
|
||||
function Segment:sideOfSegment(x, y)
|
||||
if y < self.firstPointY and y < self.secondPointY then -- above
|
||||
return 'up'
|
||||
end
|
||||
@@ -55,9 +59,7 @@ function Segment:sideOfSegment(x,y)
|
||||
end
|
||||
|
||||
function Segment:debug(msg)
|
||||
if not msg then
|
||||
msg = ''
|
||||
end
|
||||
if not msg then msg = '' end
|
||||
-- print("Segment:debug ".. msg .." ...............")
|
||||
-- print("FirstPoint: "..tostring(self.firstPointX)..','..tostring(self.firstPointY))
|
||||
-- print("SecondPoint: "..tostring(self.secondPointX)..','..tostring(self.secondPointY))
|
||||
@@ -72,22 +74,22 @@ function Segment:copy()
|
||||
copy.secondPointY = self.secondPointY
|
||||
copy.lineWidth = self.lineWidth
|
||||
copy.face = self.face
|
||||
return Segment({copy.firstPointX,copy.firstPointY},{copy.secondPointX,copy.secondPointY},copy.lineWidth, copy.face)
|
||||
return Segment({copy.firstPointX, copy.firstPointY},
|
||||
{copy.secondPointX, copy.secondPointY}, copy.lineWidth,
|
||||
copy.face)
|
||||
end
|
||||
|
||||
function Segment:endEqualsStartOf(s)
|
||||
-- segments are linked at the end of this one
|
||||
if self.secondPointX == s.firstPointX and
|
||||
self.secondPointY == s.firstPointY then
|
||||
if self.secondPointX == s.firstPointX and self.secondPointY == s.firstPointY then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
function Segment:endEqualsEndOf(s)
|
||||
-- segments are linked at the end of this one
|
||||
if self.secondPointX == s.secondPointX and self.secondPointY == s.secondPointY then
|
||||
return true
|
||||
end
|
||||
if self.secondPointX == s.secondPointX and self.secondPointY ==
|
||||
s.secondPointY then return true end
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -129,27 +131,17 @@ function Segment:splitInTwoWithPoint(point) -- number
|
||||
local s1, s2 = {}
|
||||
if point > 0 then
|
||||
if self.vertical then
|
||||
s1 = Segment(
|
||||
{self.firstPointX, self.firstPointY},
|
||||
{self.secondPointX, point},
|
||||
self.lineWidth, self.face
|
||||
)
|
||||
s2 = Segment(
|
||||
{self.firstPointX, point},
|
||||
{self.secondPointX,self.secondPointY},
|
||||
self.lineWidth, self.face
|
||||
)
|
||||
s1 = Segment({self.firstPointX, self.firstPointY},
|
||||
{self.secondPointX, point}, self.lineWidth, self.face)
|
||||
s2 = Segment({self.firstPointX, point},
|
||||
{self.secondPointX, self.secondPointY}, self.lineWidth,
|
||||
self.face)
|
||||
else
|
||||
s1 = Segment(
|
||||
{self.firstPointX, self.firstPointY},
|
||||
{point, self.secondPointY},
|
||||
self.lineWidth, self.face
|
||||
)
|
||||
s2 = Segment(
|
||||
{point, self.firstPointY},
|
||||
{self.secondPointX,self.secondPointY},
|
||||
self.lineWidth, self.face
|
||||
)
|
||||
s1 = Segment({self.firstPointX, self.firstPointY},
|
||||
{point, self.secondPointY}, self.lineWidth, self.face)
|
||||
s2 = Segment({point, self.firstPointY},
|
||||
{self.secondPointX, self.secondPointY}, self.lineWidth,
|
||||
self.face)
|
||||
end
|
||||
else
|
||||
return nil, nil
|
||||
@@ -181,16 +173,14 @@ function Segment:joinPerpendicular(s)
|
||||
-- changes the self, not the parameter
|
||||
if s.vertical then
|
||||
local sx = s.firstPointX
|
||||
if math.abs(self.firstPointX - sx) <
|
||||
math.abs(self.secondPointX - sx) then
|
||||
if math.abs(self.firstPointX - sx) < math.abs(self.secondPointX - sx) then
|
||||
self.firstPointX = sx
|
||||
else
|
||||
self.secondPointX = sx
|
||||
end
|
||||
else
|
||||
local sy = s.firstPointY
|
||||
if math.abs(self.firstPointY - sy) <
|
||||
math.abs(self.secondPointY - sy) then
|
||||
if math.abs(self.firstPointY - sy) < math.abs(self.secondPointY - sy) then
|
||||
self.firstPointY = sy
|
||||
else
|
||||
self.secondPointY = sy
|
||||
@@ -259,14 +249,14 @@ function Segment:compare(s)
|
||||
return self.firstPointY - s.firstPointY
|
||||
end
|
||||
else
|
||||
return (self.firstPointX + self.firstPointY +
|
||||
self.secondPointX + self.secondPointY) - (
|
||||
s.firstPointX + s.firstPointY + s.secondPointX
|
||||
+s.secondPointY)
|
||||
return (self.firstPointX + self.firstPointY + self.secondPointX +
|
||||
self.secondPointY) -
|
||||
(s.firstPointX + s.firstPointY + s.secondPointX +
|
||||
s.secondPointY)
|
||||
end
|
||||
end
|
||||
|
||||
function Segment:splitInThreeWithSegments(s1,s2)
|
||||
function Segment:splitInThreeWithSegments(s1, s2)
|
||||
local p1, p2, p3, t = {}
|
||||
if self.direction == 'down' or self.direction == 'right' then
|
||||
if s1:compare(s2) < 0 then
|
||||
@@ -286,23 +276,32 @@ function Segment:splitInThreeWithSegments(s1,s2)
|
||||
end
|
||||
end
|
||||
|
||||
return p1,p2,p3
|
||||
return p1, p2, p3
|
||||
end
|
||||
|
||||
function Segment:insert(list)
|
||||
|
||||
end
|
||||
function Segment:insert(list) end
|
||||
|
||||
function Segment:pointInSegment(point)
|
||||
-- remove "+ 8" and replace by sprite.width / 2
|
||||
if self.direction == 'up' or self.direction == 'down' then
|
||||
if point[1] <= self.firstPointX + 1 and
|
||||
point[1] >= self.firstPointX - 1 then
|
||||
return true
|
||||
if point[1] <= self.firstPointX + 1 and point[1] >= self.firstPointX - 1 then
|
||||
if self.direction == 'down' then
|
||||
if point[2] >= self.firstPointY and point[2] <=
|
||||
self.secondPointY then return true end
|
||||
else
|
||||
if point[2] >= self.secondPointY and point[2] <=
|
||||
self.firstPointY then return true end
|
||||
end
|
||||
end
|
||||
else
|
||||
if point[2] <= self.firstPointY + 1 and
|
||||
point[2] >= self.firstPointY - 1 then
|
||||
return true
|
||||
if point[2] <= self.firstPointY + 1 and point[2] >= self.firstPointY - 1 then
|
||||
if self.direction == 'right' then
|
||||
if point[1] >= self.firstPointX and point[1] <=
|
||||
self.secondPointX then return true end
|
||||
else
|
||||
if point[1] >= self.secondPointX and point[1] <=
|
||||
self.firstPointX then return true end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -10,3 +10,5 @@ LEVEL_RENDER_OFFSET_TOP = 30
|
||||
LEVEL_RENDER_OFFSET = 10
|
||||
|
||||
TILE_SIZE = 16
|
||||
|
||||
LINE_WIDTH = .5
|
||||
@@ -25,9 +25,9 @@ function Entity:changeState(name)
|
||||
-- printChangeState to "..name)
|
||||
end
|
||||
|
||||
-- function Entity:isMoveAllowed(point)
|
||||
-- return point.x, point.y
|
||||
-- end
|
||||
function Entity:isMoveAllowed(point)
|
||||
return true
|
||||
end
|
||||
|
||||
function Entity:changeAnimation(name)
|
||||
self.currentAnimation = self.animations[name]
|
||||
|
||||
@@ -45,3 +45,35 @@ ENTITY_DEFS = {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LEVELS_DEF = {
|
||||
[1] = {
|
||||
segments =
|
||||
{
|
||||
{
|
||||
p1 = {LEVEL_RENDER_OFFSET, LEVEL_RENDER_OFFSET_TOP},
|
||||
p2 = {VIRTUAL_WIDTH - LEVEL_RENDER_OFFSET, LEVEL_RENDER_OFFSET_TOP},
|
||||
width = LINE_WIDTH,
|
||||
face = 'down'
|
||||
},
|
||||
{
|
||||
p1 = {VIRTUAL_WIDTH - LEVEL_RENDER_OFFSET, LEVEL_RENDER_OFFSET_TOP},
|
||||
p2 = {VIRTUAL_WIDTH - LEVEL_RENDER_OFFSET, VIRTUAL_HEIGHT - LEVEL_RENDER_OFFSET},
|
||||
width = LINE_WIDTH,
|
||||
face = 'left'
|
||||
},
|
||||
{
|
||||
p1 = {VIRTUAL_WIDTH - LEVEL_RENDER_OFFSET, VIRTUAL_HEIGHT - LEVEL_RENDER_OFFSET},
|
||||
p2 = {LEVEL_RENDER_OFFSET, VIRTUAL_HEIGHT - LEVEL_RENDER_OFFSET},
|
||||
width = LINE_WIDTH,
|
||||
face = 'up'
|
||||
},
|
||||
{
|
||||
p1 = {LEVEL_RENDER_OFFSET, VIRTUAL_HEIGHT - LEVEL_RENDER_OFFSET},
|
||||
p2 = {LEVEL_RENDER_OFFSET, LEVEL_RENDER_OFFSET_TOP},
|
||||
width= LINE_WIDTH,
|
||||
face = 'right'
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -9,9 +9,11 @@ function EntityWalkState:init(entity)
|
||||
end
|
||||
|
||||
function EntityWalkState:update(dt)
|
||||
-- print("EntityWalkState - Current Position:" .. tostring(self.entity.x) .. "," .. tostring(self.entity.y))
|
||||
if self.entity.direction == 'up' then
|
||||
if self.entity:isMoveAllowed({self.entity.x, self.entity.y - self.entity.walkingSpeed * dt}) then
|
||||
self.entity.y = self.entity.y - self.entity.walkingSpeed * dt
|
||||
local move = {math.floor(self.entity.x + 0.5), math.floor(self.entity.y - self.entity.walkingSpeed * dt + 0.5)}
|
||||
if self.entity:isMoveAllowed(move) then
|
||||
self.entity.y = move[2]
|
||||
if self.entity.y + TILE_SIZE / 2 < LEVEL_RENDER_OFFSET_TOP - 2 then
|
||||
self.entity.y = self.entity.y + self.entity.walkingSpeed * dt
|
||||
Event.dispatch('back-to-wall')
|
||||
@@ -19,8 +21,9 @@ function EntityWalkState:update(dt)
|
||||
end
|
||||
end
|
||||
elseif self.entity.direction == 'down' then
|
||||
if self.entity:isMoveAllowed({self.entity.x, self.entity.y + self.entity.walkingSpeed * dt}) then
|
||||
self.entity.y = self.entity.y + self.entity.walkingSpeed * dt
|
||||
local move = {math.floor(self.entity.x + 0.5), math.floor(self.entity.y + self.entity.walkingSpeed * dt + 0.5)}
|
||||
if self.entity:isMoveAllowed(move) then
|
||||
self.entity.y = move[2]
|
||||
if self.entity.y + TILE_SIZE / 2 > VIRTUAL_HEIGHT - LEVEL_RENDER_OFFSET + 2 then
|
||||
self.entity.y = self.entity.y - self.entity.walkingSpeed * dt
|
||||
Event.dispatch('back-to-wall')
|
||||
@@ -28,8 +31,9 @@ function EntityWalkState:update(dt)
|
||||
end
|
||||
end
|
||||
elseif self.entity.direction == 'right' then
|
||||
if self.entity:isMoveAllowed({self.entity.x + self.entity.walkingSpeed * dt, self.entity.y}) then
|
||||
self.entity.x = self.entity.x + self.entity.walkingSpeed * dt
|
||||
local move = {math.floor(self.entity.x + self.entity.walkingSpeed * dt + 0.5), math.floor(self.entity.y + 0.5)}
|
||||
if self.entity:isMoveAllowed(move) then
|
||||
self.entity.x = move[1]
|
||||
if self.entity.x + TILE_SIZE / 2 > VIRTUAL_WIDTH - TILE_SIZE / 2 + 2 or self.entity.previousdirection == 'left' then
|
||||
self.entity.x = self.entity.x - self.entity.walkingSpeed * dt
|
||||
Event.dispatch('back-to-wall')
|
||||
@@ -37,8 +41,9 @@ function EntityWalkState:update(dt)
|
||||
end
|
||||
end
|
||||
elseif self.entity.direction == 'left' then
|
||||
if self.entity:isMoveAllowed({self.entity.x - self.entity.walkingSpeed * dt, self.entity.y}) then
|
||||
self.entity.x = self.entity.x - self.entity.walkingSpeed * dt
|
||||
local move = {math.floor(self.entity.x - self.entity.walkingSpeed * dt + 0.5),math.floor(self.entity.y + 0.5)}
|
||||
if self.entity:isMoveAllowed(move) then
|
||||
self.entity.x = move[1]
|
||||
if self.entity.x < 0 or self.entity.previousdirection == 'right' then
|
||||
self.entity.x = self.entity.x + self.entity.walkingSpeed * dt
|
||||
Event.dispatch('back-to-wall')
|
||||
|
||||
@@ -5,12 +5,13 @@ PlayState = Class{__includes = BaseState}
|
||||
function PlayState:init()
|
||||
self.name = 'PlayState'
|
||||
self.stage = 1
|
||||
self.level = Level(self.stage)
|
||||
self.level = Level(LEVELS_DEF, self.stage)
|
||||
self.player = Player ( ENTITY_DEFS['player'] , self.level)
|
||||
self.level.player = self.player
|
||||
self.balls = {}
|
||||
self:createBalls()
|
||||
self.level.balls = self.balls
|
||||
self.clock = Clock(30,"down")
|
||||
|
||||
gSounds['music']:setLooping(true)
|
||||
gSounds['music']:play()
|
||||
@@ -23,6 +24,7 @@ end
|
||||
function PlayState:update(dt)
|
||||
self.level:update(dt)
|
||||
self.player:update(dt)
|
||||
self.clock:update(dt)
|
||||
self:updateBalls(dt, self.level)
|
||||
self:checkEndLevel(self.level)
|
||||
end
|
||||
@@ -39,6 +41,7 @@ function PlayState:render()
|
||||
love.graphics.printf('Stage '..tostring(self.stage),
|
||||
0, 5, VIRTUAL_WIDTH, 'center')
|
||||
|
||||
self.clock:render()
|
||||
self.level:render()
|
||||
self.player:render()
|
||||
self:renderBalls(dt)
|
||||
@@ -71,15 +74,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)
|
||||
@@ -92,6 +86,13 @@ function PlayState:checkEndLevel (level)
|
||||
if level:getPerimeter() < 500 then
|
||||
self:nextStage()
|
||||
end
|
||||
|
||||
-- check if clock finished counting limit time
|
||||
if self.clock.direction == 'up' and self.clock.currentTime * 1 > self.clock.timeLimit then
|
||||
self:gameOver()
|
||||
elseif self.clock.direction == 'down' and self.clock.currentTime * 1 <= 0 then
|
||||
self:gameOver()
|
||||
end
|
||||
end
|
||||
|
||||
function PlayState:renderBalls(dt)
|
||||
@@ -110,7 +111,8 @@ function PlayState:nextStage()
|
||||
gStateStack:push(FadeOutState({
|
||||
r = 255/255, g = 255/255, b = 255/255}, 1,function()
|
||||
self.stage = self.stage + 1
|
||||
self.level = Level(self.stage)
|
||||
self.level = Level(LEVELS_DEF,self.stage)
|
||||
self.clock = Clock(self.clock.timeLimit + 3 * #self.balls,"down")
|
||||
self.player:reset()
|
||||
self.player.score = self.player.score + self.player.multiplier * #self.balls
|
||||
self.player.multiplier = self.player.multiplier + #self.balls
|
||||
|
||||
Reference in New Issue
Block a user