From ce48af53646cd9e7ec762fc1ac176b3aa620b11d Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 5 May 2011 00:57:07 +0200 Subject: - refactorized the whole project and made a few subprojects - replaced tcp with enet - added connect dialog - some smaller bugfixes --- pacman-c++/bonuspoint.cpp | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 pacman-c++/bonuspoint.cpp (limited to 'pacman-c++/bonuspoint.cpp') diff --git a/pacman-c++/bonuspoint.cpp b/pacman-c++/bonuspoint.cpp deleted file mode 100644 index 033b7c8..0000000 --- a/pacman-c++/bonuspoint.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "bonuspoint.h" -#include "constants.h" -#include "actor.h" - -#define BONUSPOINTS_NUM_SPRITES 4 - -namespace -{ - QPixmap *pixmap = NULL; -} - -BonusPoint::BonusPoint(QGraphicsItem *parent) - : GameEntity(parent) -{ - m_type = Type; - - /* empty object for servers */ - if (Constants::server) - return; - - if (pixmap == NULL) - pixmap = new QPixmap(":/bonuspoints"); - setPixmap(*pixmap); - - int rand = (int) (BONUSPOINTS_NUM_SPRITES * (qrand() / (RAND_MAX + 1.0))); - setSprite(rand * 20 + Constants::sprite_margin, Constants::sprite_margin, Constants::field_size.width, Constants::field_size.height); -} - -GameEntity::EnteredState BonusPoint::enter(Actor *actor) -{ - actor->addRoundPoints(Constants::Game::bonus_point_value); - return DestroyedEntity; -} - -void BonusPoint::onDie(Actor *actor) -{ - actor->eatingFruit(); -} -- cgit v1.2.3