when clearing lines play voices
This commit is contained in:
@ -468,6 +468,20 @@ int TetrisApp::Impl::init()
|
|||||||
suppressLineVoiceForLevelUp = false;
|
suppressLineVoiceForLevelUp = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Keep co-op line-clear SFX behavior identical to classic.
|
||||||
|
coopGame->setSoundCallback([this, playVoiceCue](int linesCleared) {
|
||||||
|
if (linesCleared <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundEffectManager::instance().playSound("clear_line", 1.0f);
|
||||||
|
|
||||||
|
if (!suppressLineVoiceForLevelUp) {
|
||||||
|
playVoiceCue(linesCleared);
|
||||||
|
}
|
||||||
|
suppressLineVoiceForLevelUp = false;
|
||||||
|
});
|
||||||
|
|
||||||
game->setLevelUpCallback([this](int /*newLevel*/) {
|
game->setLevelUpCallback([this](int /*newLevel*/) {
|
||||||
if (skipNextLevelUpJingle) {
|
if (skipNextLevelUpJingle) {
|
||||||
skipNextLevelUpJingle = false;
|
skipNextLevelUpJingle = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user