blob: 4f76007d255fe9bb6079352419c05e8852e8d3df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "point.h"
#include "constants.h"
#include "actor.h"
namespace
{
QPixmap *pixmap = NULL;
}
Point::Point(QGraphicsItem *parent)
: PixmapItem(parent)
{
if (pixmap == NULL)
pixmap = new QPixmap(":/points");
setPixmap(*pixmap);
}
bool Point::enter(Actor *actor)
{
actor->addRoundPoints(Constants::Game::point_value);
m_eaten = true;
return false;
}
void Point::onDie(Actor *actor)
{
//TODO
}
|