mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 18:39:02 -06:00
Default line clear animation set to fadeout
This commit is contained in:
parent
a047e51681
commit
288961e12a
@ -58,6 +58,14 @@ function GameMode:new(secret_inputs)
|
|||||||
"S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9",
|
"S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9",
|
||||||
"GM"
|
"GM"
|
||||||
}
|
}
|
||||||
|
self.line_clear_animation = function(x, y, skin, colour)
|
||||||
|
return {
|
||||||
|
1, 1, 1,
|
||||||
|
-0.25 + 1.25 * (self.lcd / self:getLineClearDelay()),
|
||||||
|
skin, colour,
|
||||||
|
48 + x * 16, y * 16
|
||||||
|
}
|
||||||
|
end
|
||||||
-- variables related to configurable parameters
|
-- variables related to configurable parameters
|
||||||
self.drop_locked = false
|
self.drop_locked = false
|
||||||
self.hard_drop_locked = false
|
self.hard_drop_locked = false
|
||||||
@ -543,7 +551,7 @@ function GameMode:drawLineClearAnimation()
|
|||||||
-- returns: table with RGBA, skin, colour, x, y
|
-- returns: table with RGBA, skin, colour, x, y
|
||||||
|
|
||||||
-- Fadeout (default)
|
-- Fadeout (default)
|
||||||
-- [[
|
--[[
|
||||||
function animation(x, y, skin, colour)
|
function animation(x, y, skin, colour)
|
||||||
return {
|
return {
|
||||||
1, 1, 1,
|
1, 1, 1,
|
||||||
@ -585,7 +593,7 @@ function GameMode:drawLineClearAnimation()
|
|||||||
|
|
||||||
for y, row in pairs(self.cleared_block_table) do
|
for y, row in pairs(self.cleared_block_table) do
|
||||||
for x, block in pairs(row) do
|
for x, block in pairs(row) do
|
||||||
local animation_table = animation(x, y, block.skin, block.colour)
|
local animation_table = self.line_clear_animation(x, y, block.skin, block.colour)
|
||||||
love.graphics.setColor(
|
love.graphics.setColor(
|
||||||
animation_table[1], animation_table[2],
|
animation_table[1], animation_table[2],
|
||||||
animation_table[3], animation_table[4]
|
animation_table[3], animation_table[4]
|
||||||
|
Loading…
Reference in New Issue
Block a user