2
* Copyright 2007-2008 Thomas Gallinari <tg8187@yahoo.fr>
3
* Copyright 2007-2008 Pierre-Benoit Besse <besse.pb@gmail.com>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License as
7
* published by the Free Software Foundation; either version 2 of
8
* the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
#include "characteritem.h"
26
* @brief This class is the graphical representation of a Ghost.
28
class GhostItem : public CharacterItem {
34
/** Timer to start the ghosts blinking */
35
QTimer* m_startBlinkingTimer;
40
* Creates a new GhostItem instance.
41
* @param p_model the Ghost model
43
GhostItem(Ghost* p_model);
46
* Deletes the CharacterItem instance.
51
* Ensures the blink timers are correctly set
53
void updateBlinkTimersDuration();
58
* Updates the view coordinates.
59
* @param p_x the new x-coordinate
60
* @param p_y the new y-coordinate
62
void update(qreal p_x, qreal p_y);
65
* Update the image function of the Ghost state.
70
* Implements the CharacterItem method.