mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
fixed conflicts
This commit is contained in:
parent
d1b243481b
commit
4c1e24c214
4 changed files with 10 additions and 10 deletions
|
|
@ -17,13 +17,13 @@ SoundEngine::SoundEngine(QObject *parent)
|
|||
|
||||
lastTapPlayed = QDateTime::currentDateTime();
|
||||
lastEndStepPlayed = QDateTime::currentDateTime();
|
||||
lastStartCombatPlayed = QDateTime::currentDateTime();
|
||||
lastAttackStepPlayed = QDateTime::currentDateTime();
|
||||
}
|
||||
|
||||
void SoundEngine::cacheData()
|
||||
{
|
||||
static const QStringList fileNames = QStringList()
|
||||
<< "end_step" << "tap" << "player_joined" << "start_combat";
|
||||
<< "end_step" << "tap" << "player_joined" << "attack";
|
||||
for (int i = 0; i < fileNames.size(); ++i) {
|
||||
QFile file(settingsCache->getSoundPath() + "/" + fileNames[i] + ".raw");
|
||||
if(!file.exists())
|
||||
|
|
@ -95,8 +95,8 @@ void SoundEngine::playerJoined()
|
|||
}
|
||||
|
||||
|
||||
void SoundEngine::startCombat() {
|
||||
if (lastStartCombatPlayed.secsTo(QDateTime::currentDateTime()) >= 1)
|
||||
playSound("start_combat");
|
||||
lastStartCombatPlayed = QDateTime::currentDateTime();
|
||||
void SoundEngine::attack() {
|
||||
if (lastAttackStepPlayed.secsTo(QDateTime::currentDateTime()) >= 1)
|
||||
playSound("attack");
|
||||
lastAttackStepPlayed = QDateTime::currentDateTime();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue