From: cboissie Date: Thu, 2 Jun 2011 15:09:23 +0000 (+0200) Subject: latest wip X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f2dc297c7b1f9577724ece5df50feba06a2a87db;p=Bug_Attack.git latest wip --- diff --git a/defenser.cpp b/defenser.cpp index 4f387ec..caf995d 100644 --- a/defenser.cpp +++ b/defenser.cpp @@ -1,4 +1,5 @@ #include +#include #include "defenser.h" #include "projectile.h" @@ -680,7 +681,6 @@ Musician::Musician(int posx,int posy,unsigned int level,Map* map) // Caractéristiques _range = 1; // portée de 1 case this->updateStats(); - // Mise à jour auto des bonus QObject::connect(_map,SIGNAL(updateBonuses()),this,SLOT(applyBonuses())); } @@ -756,7 +756,6 @@ void Musician::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget // Dessine la tourelle painter->setBrush(QBrush(Qt::yellow)); painter->drawRect(0,0,32,32); - } diff --git a/mainwindow.cpp b/mainwindow.cpp index 93e8121..795517f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -204,9 +204,10 @@ void MainWindow::reloadGame(void) { this->disconnect(); // Libère la mémoire - delete _player; +/* delete _player; + _sceneMap->clear(); delete _sceneMap->getWaveGenerator(); - delete _sceneMap; // Détruira tous les éléments de la scène + delete _sceneMap; // Détruira tous les éléments de la scène*/ // Relance le jeu (nb: les éléments de l'ancienne partie seront automatiquement supprimés par l'appel au new) this->launchGame(this->parentWidget()); diff --git a/player.cpp b/player.cpp index b6d7558..d61896f 100644 --- a/player.cpp +++ b/player.cpp @@ -110,6 +110,7 @@ void Player::setTurretChoice(TYPE::TURRET choice) { } } + void Player::setTurretChoice1(){this->setTurretChoice(TYPE::PISTOLET_A_EAU);} void Player::setTurretChoice2(){this->setTurretChoice(TYPE::LANCE_PIERRES);} void Player::setTurretChoice3(){this->setTurretChoice(TYPE::PAINTBALL);} diff --git a/types.h b/types.h index 800b0e3..d8b6639 100644 --- a/types.h +++ b/types.h @@ -24,7 +24,7 @@ typedef enum { NONE, PISTOLET_A_EAU, LANCE_PIERRES, PAINTBALL, PETANQUE, MUSICIE namespace GAME { typedef enum { EASY = 1, HARD = 2 } DIFFICULTY; -static const short FPS = 30; +static const short FPS = 80; }