]> khamidou — GitHub mirrors - Bug_Attack.git/commitdiff
latest wip
authorcboissie <clemzbox@gmail.com>
Thu, 2 Jun 2011 15:09:23 +0000 (17:09 +0200)
committercboissie <clemzbox@gmail.com>
Thu, 2 Jun 2011 15:09:23 +0000 (17:09 +0200)
defenser.cpp
mainwindow.cpp
player.cpp
types.h

index 4f387ec6bb17b2c29a6c8b5bf5bd95efca88b260..caf995d7acde560144b2b52fb24dd758a7c30a04 100644 (file)
@@ -1,4 +1,5 @@
 #include <math.h>
+#include <iostream>
 #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);
-
 }
 
 
index 93e81219eefdd19b6061a89cc81d3023bb786ca4..795517f71f42e6d8e5d7108b7be51647ee843385 100644 (file)
@@ -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());
index b6d75586e30560357ad9fdd6638a80b3ac162e88..d61896f44a7696e0ac040096aa8344485d762852 100644 (file)
@@ -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 800b0e336ff9d62192830e6cc61a54dddb22c323..d8b6639d3dc72a924ed06c2be6a30bb4794532ef 100644 (file)
--- 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;
 
 }