File indexing completed on 2024-04-21 04:02:09

0001 /*******************************************************************************
0002  *   KBlocks, a falling blocks game by KDE                                     *
0003  *   SPDX-FileCopyrightText: 2009-2021 Mauricio Piacentini <mauricio@tabuleiro.com>      *
0004  *                           Zhongjie Cai <squall.leonhart.cai@gmail.com>      *
0005  *                           Julian Helfferich <julian.helfferich@mailbox.org> *
0006  *                                                                             *
0007  *   SPDX-License-Identifier: GPL-2.0-or-later
0008  ******************************************************************************/
0009 #ifndef KBLOCKSSOUND_H
0010 #define KBLOCKSSOUND_H
0011 
0012 #include "SoundInterface.h"
0013 
0014 class KGameSound;
0015 
0016 class KBlocksSound : public SoundInterface
0017 {
0018 public:
0019     explicit KBlocksSound(const KGameTheme *theme);
0020     ~KBlocksSound() override;
0021 
0022 public:
0023     bool loadTheme(const KGameTheme *theme) override;
0024     void setSoundsEnabled(bool p_enabled) override;
0025     void playSound(Sound soundType) override;
0026 
0027 private:
0028     KGameSound *m_blockFallSound = nullptr;
0029     KGameSound *m_blockMoveSound = nullptr;
0030     KGameSound *m_blockRemoveSound = nullptr;
0031     bool sndActive;
0032 
0033 };
0034 
0035 #endif