#include "seascene.h"
-#include "timercontrolledtursas.h"
+#include "octopus.h"
#include "ship.h"
#include <QGraphicsPixmapItem>
#include <QDebug>
//spread the octopuses
+ QList<Octopus*> octopuses;
for (int i=0; i < octopuses; i++)
{
break;
QPixmap octopusPixmap (":/pix/tursas.png");
- TimerControlledTursas * pOctopus = new TimerControlledTursas (octopusPixmap,100);
+ Octopus * pOctopus = new Octopus(octopusPixmap,100);
pOctopus->setData(0,"octopus");
pOctopus->setPos(*pPosition);
addItem(pOctopus);
movingItems_.append(pOctopus);
connect(this,SIGNAL(pauseOn()),pOctopus,SLOT(stopMoving()));
connect(this,SIGNAL(pauseOff()),pOctopus,SLOT(startMoving()));
+ octopuses.append(pOctopus);
delete pPosition;
}
movingItems_.append(pShip);
connect(this,SIGNAL(pauseOn()),pShip,SLOT(stopMoving()));
connect(this,SIGNAL(pauseOff()),pShip,SLOT(startMoving()));
+ foreach (Octopus* pOctopus, octopuses)
+ {
+ connect(pOctopus,SIGNAL(droppingGhosts()),pShip,SLOT(dropAllGhosts()));
+ }
delete pPosition;
}