add schema new loader model using xml separated work and load data validation using schema map data in xml new core model... proecting
38 lines
968 B
C++
38 lines
968 B
C++
#include "adcore.h"
|
|
|
|
adCore::adCore(QObject *parent) :
|
|
QThread(parent)
|
|
{
|
|
step = 0;
|
|
//admap = new Map(1);
|
|
//addata = new Game_Data(admap);
|
|
adload = new Loader();
|
|
//admap->load();
|
|
//adload->create();
|
|
//adload->readAliens();
|
|
// Player * pl1 = new Player(0);
|
|
// Player * pl2 = new Player(0);
|
|
// addata->players.push_back(pl1);
|
|
// addata->players.push_back(pl2);
|
|
// adaliens = new Aliens(addata);
|
|
// adtowers = new Towers(addata);
|
|
// adsplashes = new Splashes(addata);
|
|
// connect(admap,SIGNAL(RecreateAlienPath(bool*)),adaliens,SLOT(retrace(bool*)));
|
|
// adaliens->AddAlien(0);
|
|
// adaliens->AddAlien(0);
|
|
// adaliens->AddAlien(0);
|
|
// for (int i=0; i<qMin(admap->mapsize.width(),admap->mapsize.height()); i++)
|
|
// adtowers->AddTower(0,0,QPoint(i,i));
|
|
// for (int i=0; i<admap->mapsize.height();i++)
|
|
// adtowers->AddTower(1,0,QPoint(admap->mapsize.width()-2,i));
|
|
}
|
|
|
|
|
|
void adCore::next()
|
|
{
|
|
adtowers->update();
|
|
adsplashes->update();
|
|
adaliens->update();
|
|
step++;
|
|
}
|