added morphs, fix some bugs, new images

added onAlienInRadius trigger
but it not work right((
This commit is contained in:
2011-08-21 22:22:02 +04:00
parent fa68b5a120
commit 894e55bb41
186 changed files with 4040 additions and 3022 deletions

View File

@@ -8,7 +8,7 @@ AD_Core::AD_Core(QObject *parent) :
adloader->load("data2.xml");
addata = adloader->loadlevel(1);
delete adloader;
if (addata != 0) qDebug("Sucsess");
if (addata != 0) qDebug("Success");
else qFatal("Error");
adtowers = new Towers(addata);
adsplashes = new Splashes(addata);
@@ -17,7 +17,7 @@ AD_Core::AD_Core(QObject *parent) :
connect(adsplashes,SIGNAL(killAlien(int,int)),this,SLOT(killAlien(int,int)));
waveInProgress = false;
waveEnd = false;
startTimer(50);
timer = startTimer(40);
}
@@ -26,6 +26,10 @@ void AD_Core::next()
adtowers->update();
adsplashes->update();
addata->aliens->update();
foreach(Player * p, addata->players)
{
if (!addata->aliens->curAliens.contains(p->selectAlienId)) p->selectAlienId = -1;
}
waveProcessing();
step++;
}
@@ -81,7 +85,7 @@ void AD_Core::waveProcessing()
void AD_Core::killAlien(int playerId, int alienId)
{
addata->players.at(playerId)->money += addata->aliens->curAliens[alienId].src->prise;
addata->players[playerId]->money += addata->aliens->curAliens[alienId].src->prise;
addata->aliens->delAlien(alienId);
}
@@ -92,3 +96,10 @@ void AD_Core::setScene(QGraphicsScene *scene)
adtowers->setScene(scene);
adsplashes->setScene(scene);
}
void AD_Core::setSpeed(float x)
{
killTimer(timer);
timer = startTimer(qRound(40.f/x));
}