mirror of
https://github.com/SashLilac/cambridge.git
synced 2025-05-13 20:21:25 -05:00
Compare commits
21 Commits
1556b247fe
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0fdaf30ab | ||
|
|
8062f6e3fa | ||
|
|
7c3cf0b1bd | ||
|
|
52ddbbc174 | ||
|
|
5f81c35677 | ||
|
|
635ef6270f | ||
|
|
649dd5f31d | ||
|
|
34fcc3f659 | ||
|
|
4caa268adc | ||
|
|
a79552a6f3 | ||
|
|
cd90405865 | ||
|
|
e69659b2ad | ||
|
|
d90e382037 | ||
|
|
ba6f5bb837 | ||
|
|
39e9dc3303 | ||
|
|
a1f0dfd9f2 | ||
|
|
2a21484137 | ||
|
|
50410958f0 | ||
|
|
6fb583e463 | ||
|
|
91c8dc3dcc | ||
|
|
2166a3c6d8 |
@@ -60,6 +60,9 @@ function formatTime(frames)
|
|||||||
min = math.floor(frames/3600)
|
min = math.floor(frames/3600)
|
||||||
sec = math.floor(frames/60) % 60
|
sec = math.floor(frames/60) % 60
|
||||||
hund = math.floor(frames/.6) % 100
|
hund = math.floor(frames/.6) % 100
|
||||||
|
if frames == 15641 then
|
||||||
|
hund = math.ceil(frames/.6) % 100
|
||||||
|
end
|
||||||
str = string.format("%02d:%02d.%02d", min, sec, hund)
|
str = string.format("%02d:%02d.%02d", min, sec, hund)
|
||||||
return str
|
return str
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ bgm = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local current_bgm = nil
|
local current_bgm = nil
|
||||||
|
local pitch = 1
|
||||||
local bgm_locked = false
|
local bgm_locked = false
|
||||||
|
|
||||||
function switchBGM(sound, subsound)
|
function switchBGM(sound, subsound)
|
||||||
@@ -84,5 +85,13 @@ end
|
|||||||
function resumeBGM()
|
function resumeBGM()
|
||||||
if current_bgm ~= nil then
|
if current_bgm ~= nil then
|
||||||
current_bgm:play()
|
current_bgm:play()
|
||||||
|
current_bgm:setPitch(pitch)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function pitchBGM(new_pitch)
|
||||||
|
pitch = new_pitch
|
||||||
|
if current_bgm ~= nil then
|
||||||
|
current_bgm:setPitch(pitch)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ named_backgrounds = {
|
|||||||
}
|
}
|
||||||
current_playing_bgs = {}
|
current_playing_bgs = {}
|
||||||
extended_bgs = {}
|
extended_bgs = {}
|
||||||
image_formats = {".png", ".jpg"}
|
image_formats = {".jpg", ".png"}
|
||||||
bgpath = "res/backgrounds/"
|
bgpath = "res/backgrounds/"
|
||||||
dir = love.filesystem.getDirectoryItems(bgpath)
|
dir = love.filesystem.getDirectoryItems(bgpath)
|
||||||
|
|
||||||
local backgrounds = {}
|
backgrounds = {}
|
||||||
|
|
||||||
local function loadExtendedBgs()
|
local function loadExtendedBgs()
|
||||||
extended_bgs = require("res.backgrounds.extend_section_bg")
|
extended_bgs = require("res.backgrounds.extend_section_bg")
|
||||||
@@ -197,4 +197,17 @@ misc_graphics = {
|
|||||||
strike = love.graphics.newImage("res/img/strike.png"),
|
strike = love.graphics.newImage("res/img/strike.png"),
|
||||||
santa = love.graphics.newImage("res/img/santa.png"),
|
santa = love.graphics.newImage("res/img/santa.png"),
|
||||||
icon = love.graphics.newImage("res/img/cambridge_transparent.png")
|
icon = love.graphics.newImage("res/img/cambridge_transparent.png")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- utility function to allow any size background to be used
|
||||||
|
-- this will stretch the background to 4:3 aspect ratio
|
||||||
|
function drawBackground(id)
|
||||||
|
local bg_object = fetchBackgroundAndLoop(id)
|
||||||
|
local width = bg_object:getWidth()
|
||||||
|
local height = bg_object:getHeight()
|
||||||
|
love.graphics.draw(
|
||||||
|
bg_object,
|
||||||
|
0, 0, 0,
|
||||||
|
640 / width, 480 / height
|
||||||
|
)
|
||||||
|
end
|
||||||
@@ -1 +1 @@
|
|||||||
version = "v0.3.3.2"
|
version = "v0.3.4"
|
||||||
2
main.lua
2
main.lua
@@ -113,7 +113,7 @@ function love.keypressed(key, scancode)
|
|||||||
saveConfig()
|
saveConfig()
|
||||||
scene.restart_message = true
|
scene.restart_message = true
|
||||||
if config.secret then playSE("mode_decide")
|
if config.secret then playSE("mode_decide")
|
||||||
else playSE("erase") end
|
else playSE("erase", "single") end
|
||||||
-- f12 is reserved for saving screenshots
|
-- f12 is reserved for saving screenshots
|
||||||
elseif scancode == "f12" then
|
elseif scancode == "f12" then
|
||||||
local ss_name = os.date("ss/%Y-%m-%d_%H-%M-%S.png")
|
local ss_name = os.date("ss/%Y-%m-%d_%H-%M-%S.png")
|
||||||
|
|||||||
@@ -30,11 +30,7 @@ function CreditsScene:render()
|
|||||||
local offset = self.frames / self.scroll_speed
|
local offset = self.frames / self.scroll_speed
|
||||||
|
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(
|
drawBackground(19)
|
||||||
fetchBackgroundAndLoop(id),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_4)
|
love.graphics.setFont(font_3x5_4)
|
||||||
love.graphics.print("Cambridge Credits", 320, 500 - offset)
|
love.graphics.print("Cambridge Credits", 320, 500 - offset)
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ function GameScene:onInputPress(e)
|
|||||||
scene = e.input == "retry" and GameScene(self.retry_mode, self.retry_ruleset, self.secret_inputs) or ModeSelectScene()
|
scene = e.input == "retry" and GameScene(self.retry_mode, self.retry_ruleset, self.secret_inputs) or ModeSelectScene()
|
||||||
elseif e.input == "retry" then
|
elseif e.input == "retry" then
|
||||||
switchBGM(nil)
|
switchBGM(nil)
|
||||||
|
pitchBGM(1)
|
||||||
self.game:onExit()
|
self.game:onExit()
|
||||||
scene = GameScene(self.retry_mode, self.retry_ruleset, self.secret_inputs)
|
scene = GameScene(self.retry_mode, self.retry_ruleset, self.secret_inputs)
|
||||||
elseif e.input == "pause" and not (self.game.game_over or self.game.completed) then
|
elseif e.input == "pause" and not (self.game.game_over or self.game.completed) then
|
||||||
|
|||||||
@@ -45,11 +45,7 @@ end
|
|||||||
|
|
||||||
function ConfigScene:render()
|
function ConfigScene:render()
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(
|
drawBackground("options_game")
|
||||||
fetchBackgroundAndLoop("options_game"),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_4)
|
love.graphics.setFont(font_3x5_4)
|
||||||
love.graphics.print("GAME SETTINGS", 80, 40)
|
love.graphics.print("GAME SETTINGS", 80, 40)
|
||||||
|
|||||||
@@ -20,11 +20,7 @@ function ConfigScene:update() end
|
|||||||
|
|
||||||
function ConfigScene:render()
|
function ConfigScene:render()
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(
|
drawBackground("options_input")
|
||||||
fetchBackgroundAndLoop("options_input"),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_4)
|
love.graphics.setFont(font_3x5_4)
|
||||||
love.graphics.print("INPUT CONFIG", 80, 40)
|
love.graphics.print("INPUT CONFIG", 80, 40)
|
||||||
|
|||||||
@@ -45,11 +45,7 @@ end
|
|||||||
|
|
||||||
function KeyConfigScene:render()
|
function KeyConfigScene:render()
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(
|
drawBackground("options_input")
|
||||||
fetchBackgroundAndLoop("input_config"),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_2)
|
love.graphics.setFont(font_3x5_2)
|
||||||
for i, input in ipairs(configurable_inputs) do
|
for i, input in ipairs(configurable_inputs) do
|
||||||
|
|||||||
@@ -58,11 +58,7 @@ function ModeSelectScene:update()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ModeSelectScene:render()
|
function ModeSelectScene:render()
|
||||||
love.graphics.draw(
|
drawBackground(0)
|
||||||
fetchBackgroundAndLoop(0),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.draw(misc_graphics["select_mode"], 20, 40)
|
love.graphics.draw(misc_graphics["select_mode"], 20, 40)
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ function ReplayScene:new(replay, game_mode, ruleset)
|
|||||||
self.replay_index = 1
|
self.replay_index = 1
|
||||||
self.replay_speed = 1
|
self.replay_speed = 1
|
||||||
self.show_invisible = false
|
self.show_invisible = false
|
||||||
|
self.frame_steps = 0
|
||||||
DiscordRPC:update({
|
DiscordRPC:update({
|
||||||
details = "Viewing a replay",
|
details = "Viewing a replay",
|
||||||
state = self.game.name,
|
state = self.game.name,
|
||||||
@@ -47,7 +48,10 @@ end
|
|||||||
|
|
||||||
function ReplayScene:update()
|
function ReplayScene:update()
|
||||||
local frames_left = self.replay_speed
|
local frames_left = self.replay_speed
|
||||||
if not self.paused then
|
if not self.paused or self.frame_steps > 0 then
|
||||||
|
if self.frame_steps > 0 then
|
||||||
|
self.frame_steps = self.frame_steps - 1
|
||||||
|
end
|
||||||
while frames_left > 0 do
|
while frames_left > 0 do
|
||||||
frames_left = frames_left - 1
|
frames_left = frames_left - 1
|
||||||
self.inputs = self.replay["inputs"][self.replay_index]["inputs"]
|
self.inputs = self.replay["inputs"][self.replay_index]["inputs"]
|
||||||
@@ -107,6 +111,8 @@ function ReplayScene:onInputPress(e)
|
|||||||
e.input == "menu_decide" or
|
e.input == "menu_decide" or
|
||||||
e.input == "retry"
|
e.input == "retry"
|
||||||
) then
|
) then
|
||||||
|
switchBGM(nil)
|
||||||
|
pitchBGM(1)
|
||||||
self.game:onExit()
|
self.game:onExit()
|
||||||
loadSave()
|
loadSave()
|
||||||
love.math.setRandomSeed(os.time())
|
love.math.setRandomSeed(os.time())
|
||||||
@@ -121,16 +127,21 @@ function ReplayScene:onInputPress(e)
|
|||||||
self.paused = not self.paused
|
self.paused = not self.paused
|
||||||
if self.paused then pauseBGM()
|
if self.paused then pauseBGM()
|
||||||
else resumeBGM() end
|
else resumeBGM() end
|
||||||
|
--frame step
|
||||||
|
elseif e.input == "rotate_left" then
|
||||||
|
self.frame_steps = self.frame_steps + 1
|
||||||
elseif e.input == "left" then
|
elseif e.input == "left" then
|
||||||
self.replay_speed = self.replay_speed - 1
|
self.replay_speed = self.replay_speed - 1
|
||||||
if self.replay_speed < 1 then
|
if self.replay_speed < 1 then
|
||||||
self.replay_speed = 1
|
self.replay_speed = 1
|
||||||
end
|
end
|
||||||
|
pitchBGM(self.replay_speed)
|
||||||
elseif e.input == "right" then
|
elseif e.input == "right" then
|
||||||
self.replay_speed = self.replay_speed + 1
|
self.replay_speed = self.replay_speed + 1
|
||||||
if self.replay_speed > 99 then
|
if self.replay_speed > 99 then
|
||||||
self.replay_speed = 99
|
self.replay_speed = 99
|
||||||
end
|
end
|
||||||
|
pitchBGM(self.replay_speed)
|
||||||
elseif e.input == "hold" then
|
elseif e.input == "hold" then
|
||||||
self.show_invisible = not self.show_invisible
|
self.show_invisible = not self.show_invisible
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -47,8 +47,6 @@ function ReplaySelectScene:new()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ReplaySelectScene:update()
|
function ReplaySelectScene:update()
|
||||||
switchBGM(nil) -- experimental
|
|
||||||
|
|
||||||
if self.das_up or self.das_down or self.das_left or self.das_right then
|
if self.das_up or self.das_down or self.das_left or self.das_right then
|
||||||
self.das = self.das + 1
|
self.das = self.das + 1
|
||||||
else
|
else
|
||||||
@@ -78,11 +76,7 @@ function ReplaySelectScene:update()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ReplaySelectScene:render()
|
function ReplaySelectScene:render()
|
||||||
love.graphics.draw(
|
drawBackground(0)
|
||||||
fetchBackgroundAndLoop(0),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
-- Same graphic as mode select
|
-- Same graphic as mode select
|
||||||
--love.graphics.draw(misc_graphics["select_mode"], 20, 40)
|
--love.graphics.draw(misc_graphics["select_mode"], 20, 40)
|
||||||
|
|||||||
@@ -29,11 +29,7 @@ function SettingsScene:update() end
|
|||||||
|
|
||||||
function SettingsScene:render()
|
function SettingsScene:render()
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(
|
drawBackground("options_game")
|
||||||
fetchBackgroundAndLoop("options_game"),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_4)
|
love.graphics.setFont(font_3x5_4)
|
||||||
love.graphics.print("SETTINGS", 80, 40)
|
love.graphics.print("SETTINGS", 80, 40)
|
||||||
|
|||||||
@@ -46,11 +46,7 @@ end
|
|||||||
|
|
||||||
function StickConfigScene:render()
|
function StickConfigScene:render()
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(
|
drawBackground("options_input")
|
||||||
fetchBackgroundAndLoop("options_input"),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.setFont(font_3x5_2)
|
love.graphics.setFont(font_3x5_2)
|
||||||
for i, input in ipairs(configurable_inputs) do
|
for i, input in ipairs(configurable_inputs) do
|
||||||
|
|||||||
@@ -73,11 +73,7 @@ local block_offsets = {
|
|||||||
function TitleScene:render()
|
function TitleScene:render()
|
||||||
love.graphics.setFont(font_3x5_4)
|
love.graphics.setFont(font_3x5_4)
|
||||||
love.graphics.setColor(1, 1, 1, 1 - self.snow_bg_opacity)
|
love.graphics.setColor(1, 1, 1, 1 - self.snow_bg_opacity)
|
||||||
love.graphics.draw(
|
drawBackground("title_no_icon") -- title, title_night
|
||||||
fetchBackgroundAndLoop("title_no_icon"), -- title, title_night
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
-- 490, 192
|
-- 490, 192
|
||||||
for _, b in ipairs(block_offsets) do
|
for _, b in ipairs(block_offsets) do
|
||||||
@@ -99,11 +95,7 @@ function TitleScene:render()
|
|||||||
|
|
||||||
love.graphics.setFont(font_3x5_2)
|
love.graphics.setFont(font_3x5_2)
|
||||||
love.graphics.setColor(1, 1, 1, self.snow_bg_opacity)
|
love.graphics.setColor(1, 1, 1, self.snow_bg_opacity)
|
||||||
love.graphics.draw(
|
drawBackground("snow")
|
||||||
fetchBackgroundAndLoop("snow"),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.draw(
|
love.graphics.draw(
|
||||||
misc_graphics["santa"],
|
misc_graphics["santa"],
|
||||||
|
|||||||
@@ -34,11 +34,7 @@ end
|
|||||||
|
|
||||||
function TuningScene:render()
|
function TuningScene:render()
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(
|
drawBackground("options_game")
|
||||||
fetchBackgroundAndLoop("options_game"),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
|
|
||||||
love.graphics.setColor(1, 1, 1, 0.5)
|
love.graphics.setColor(1, 1, 1, 0.5)
|
||||||
love.graphics.rectangle("fill", 75, 98 + self.highlight * 75, 400, 33)
|
love.graphics.rectangle("fill", 75, 98 + self.highlight * 75, 400, 33)
|
||||||
|
|||||||
@@ -10,41 +10,10 @@ BigA2Game.tagline = "Big blocks in the most celebrated TGM mode!"
|
|||||||
function BigA2Game:new()
|
function BigA2Game:new()
|
||||||
BigA2Game.super:new()
|
BigA2Game.super:new()
|
||||||
self.big_mode = true
|
self.big_mode = true
|
||||||
end
|
local getClearedRowCount = self.grid.getClearedRowCount
|
||||||
|
self.grid.getClearedRowCount = function(self)
|
||||||
function BigA2Game:updateScore(level, drop_bonus, cleared_lines)
|
return getClearedRowCount(self) / 2
|
||||||
cleared_lines = cleared_lines / 2
|
|
||||||
if not self.clear then
|
|
||||||
self:updateGrade(cleared_lines)
|
|
||||||
if cleared_lines >= 4 then
|
|
||||||
self.tetris_count = self.tetris_count + 1
|
|
||||||
end
|
|
||||||
if self.grid:checkForBravo(cleared_lines) then self.bravo = 4 else self.bravo = 1 end
|
|
||||||
if cleared_lines > 0 then
|
|
||||||
self.combo = self.combo + (cleared_lines - 1) * 2
|
|
||||||
self.score = self.score + (
|
|
||||||
(math.ceil((level + cleared_lines) / 4) + drop_bonus) *
|
|
||||||
cleared_lines * self.combo * self.bravo
|
|
||||||
)
|
|
||||||
else
|
|
||||||
self.combo = 1
|
|
||||||
end
|
|
||||||
self.drop_bonus = 0
|
|
||||||
else self.lines = self.lines + cleared_lines end
|
|
||||||
end
|
|
||||||
|
|
||||||
function BigA2Game:onLineClear(cleared_row_count)
|
|
||||||
cleared_row_count = cleared_row_count / 2
|
|
||||||
self:updateSectionTimes(self.level, self.level + cleared_row_count)
|
|
||||||
self.level = math.min(self.level + cleared_row_count, 999)
|
|
||||||
if self.level == 999 and not self.clear then
|
|
||||||
self.clear = true
|
|
||||||
self.grid:clear()
|
|
||||||
if self:qualifiesForMRoll() then self.grade = 32 end
|
|
||||||
self.roll_frames = -150
|
|
||||||
end
|
end
|
||||||
self.lock_drop = self.level >= 900
|
|
||||||
self.lock_hard_drop = self.level >= 900
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return BigA2Game
|
return BigA2Game
|
||||||
@@ -179,6 +179,9 @@ function GameMode:update(inputs, ruleset)
|
|||||||
if self.game_over or self.completed then
|
if self.game_over or self.completed then
|
||||||
if self.save_replay and self.game_over_frames == 0 then
|
if self.save_replay and self.game_over_frames == 0 then
|
||||||
self:saveReplay()
|
self:saveReplay()
|
||||||
|
|
||||||
|
-- ensure replays are only saved once per game, incase self.game_over_frames == 0 for longer than one frame
|
||||||
|
self.save_replay = false
|
||||||
end
|
end
|
||||||
self.game_over_frames = self.game_over_frames + 1
|
self.game_over_frames = self.game_over_frames + 1
|
||||||
return
|
return
|
||||||
@@ -400,6 +403,7 @@ end
|
|||||||
|
|
||||||
function GameMode:onGameOver()
|
function GameMode:onGameOver()
|
||||||
switchBGM(nil)
|
switchBGM(nil)
|
||||||
|
pitchBGM(1)
|
||||||
local alpha = 0
|
local alpha = 0
|
||||||
local animation_length = 120
|
local animation_length = 120
|
||||||
if self.game_over_frames < animation_length then
|
if self.game_over_frames < animation_length then
|
||||||
@@ -980,13 +984,9 @@ end
|
|||||||
|
|
||||||
function GameMode:drawBackground()
|
function GameMode:drawBackground()
|
||||||
local id = self:getBackground()
|
local id = self:getBackground()
|
||||||
-- if type(id) == "number" then id = clamp(id, 0, #backgrounds) end
|
if type(id) == "number" then id = clamp(id, 0, #backgrounds) end
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.draw(
|
drawBackground(id)
|
||||||
fetchBackgroundAndLoop(id),
|
|
||||||
0, 0, 0,
|
|
||||||
0.5, 0.5
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function GameMode:drawFrame()
|
function GameMode:drawFrame()
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ end
|
|||||||
|
|
||||||
Survival2020Game.opacityFunction = function(age)
|
Survival2020Game.opacityFunction = function(age)
|
||||||
if age > 300 then return 0
|
if age > 300 then return 0
|
||||||
else return 1 - Math.max(age - 240, 0) / 60 end
|
else return 1 - math.max(age - 240, 0) / 60 end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Survival2020Game:drawGrid()
|
function Survival2020Game:drawGrid()
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ function SRS:onPieceMove(piece, grid)
|
|||||||
if piece.manipulations >= SRS.MANIPULATIONS_MAX then
|
if piece.manipulations >= SRS.MANIPULATIONS_MAX then
|
||||||
piece.locked = true
|
piece.locked = true
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
piece.locked = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user