mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 08:59:02 -06:00
Major sound effect update (closes #7?)
Sound effects can still be changed, and #7 can still be reopened.
This commit is contained in:
parent
1f686fb5d4
commit
4afe9f2bd4
@ -38,8 +38,9 @@ Sounds
|
||||
------
|
||||
|
||||
All piece sounds are (c) 2020 Damian Yerrick.
|
||||
Ready / go sounds from NullpoMino.
|
||||
Menu sounds from TGM3 (will be replaced.)
|
||||
Other sounds from:
|
||||
- NullpoMino
|
||||
- DTET, (c) 2003 Mihys.
|
||||
|
||||
Music
|
||||
-----
|
||||
|
@ -20,6 +20,8 @@ sounds = {
|
||||
fall = love.audio.newSource("res/se/fall.wav", "static"),
|
||||
ready = love.audio.newSource("res/se/ready.wav", "static"),
|
||||
go = love.audio.newSource("res/se/go.wav", "static"),
|
||||
irs = love.audio.newSource("res/se/irs.wav", "static"),
|
||||
ihs = love.audio.newSource("res/se/ihs.wav", "static"),
|
||||
}
|
||||
|
||||
function playSE(sound, subsound)
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
res/se/ihs.wav
Normal file
BIN
res/se/ihs.wav
Normal file
Binary file not shown.
BIN
res/se/irs.wav
Normal file
BIN
res/se/irs.wav
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -224,9 +224,7 @@ end
|
||||
function GameMode:onLineClear(cleared_row_count) end
|
||||
|
||||
function GameMode:onPieceEnter() end
|
||||
function GameMode:onHold()
|
||||
playSE("hold")
|
||||
end
|
||||
function GameMode:onHold() end
|
||||
|
||||
function GameMode:onSoftDrop(dropped_row_count)
|
||||
self.drop_bonus = self.drop_bonus + 1 * dropped_row_count
|
||||
@ -363,7 +361,7 @@ end
|
||||
|
||||
function GameMode:initializeOrHold(inputs, ruleset)
|
||||
if self.ihs and self.enable_hold and inputs["hold"] == true then
|
||||
self:hold(inputs, ruleset)
|
||||
self:hold(inputs, ruleset, true)
|
||||
else
|
||||
self:initializeNextPiece(inputs, ruleset, self.next_queue[1])
|
||||
end
|
||||
@ -374,7 +372,7 @@ function GameMode:initializeOrHold(inputs, ruleset)
|
||||
end
|
||||
end
|
||||
|
||||
function GameMode:hold(inputs, ruleset)
|
||||
function GameMode:hold(inputs, ruleset, ihs)
|
||||
local data = copy(self.hold_queue)
|
||||
if self.piece == nil then
|
||||
self.hold_queue = self.next_queue[1]
|
||||
@ -393,6 +391,8 @@ function GameMode:hold(inputs, ruleset)
|
||||
self:initializeNextPiece(inputs, ruleset, data, false)
|
||||
end
|
||||
self.held = true
|
||||
if ihs then playSE("ihs")
|
||||
else playSE("hold") end
|
||||
self:onHold()
|
||||
end
|
||||
|
||||
|
@ -291,7 +291,7 @@ function PhantomMania2Game:setHoldOpacity()
|
||||
if self.level > 1000 and self.level < 1300 then
|
||||
love.graphics.setColor(1, 1, 1, 1 - math.min(1, self.hold_age / 15))
|
||||
else
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
self.super:setHoldOpacity(1, self.held and 0.6 or 1)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -197,7 +197,14 @@ function Ruleset:initializePiece(
|
||||
}, self.block_offsets, 0, 0, data.skin, colours[data.shape], big)
|
||||
|
||||
self:onPieceCreate(piece)
|
||||
if irs then self:rotatePiece(inputs, piece, grid, {}, true) end
|
||||
if irs then
|
||||
if inputs.rotate_left or inputs.rotate_left2 or
|
||||
inputs.rotate_right or inputs.rotate_right2 or
|
||||
inputs.rotate_180 then
|
||||
playSE("irs")
|
||||
end
|
||||
self:rotatePiece(inputs, piece, grid, {}, true)
|
||||
end
|
||||
self:dropPiece(inputs, piece, grid, gravity, drop_speed, drop_locked, hard_drop_locked)
|
||||
return piece
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user