File indexing completed on 2024-02-18 04:03:23

0001 /*
0002     SPDX-FileCopyrightText: 2009 Mathias Kraus <k.hias@gmx.de>
0003     SPDX-FileCopyrightText: 2007-2008 Thomas Gallinari <tg8187@yahoo.fr>
0004     SPDX-FileCopyrightText: 2007-2008 Gaƫl Courcelle <gael.courcelle@gmail.com>
0005     SPDX-FileCopyrightText: 2007-2008 Alexia Allanic <alexia_allanic@yahoo.fr>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #include "block.h"
0011 
0012 Block::Block(qreal p_x, qreal p_y, Arena* p_arena, const QString& p_imageId) : Element(p_x, p_y, p_arena)
0013 {
0014     m_imageId = p_imageId;
0015     m_type = Granatier::Element::BLOCK;
0016     m_bonus = nullptr;
0017 }
0018 
0019 Block::~Block()
0020 = default;
0021 
0022 void Block::setBonus(Bonus* bonus)
0023 {
0024     m_bonus = bonus;
0025 }
0026 
0027 Bonus* Block::getBonus()
0028 {
0029     return m_bonus;
0030 }
0031 
0032 void Block::startDestruction()
0033 {
0034     Q_EMIT startDestructionAnimation();
0035 }
0036 
0037 #include "moc_block.cpp"