correct core module with new types
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
#include "aliens.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
Aliens::Aliens(Game_Data *gd, QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
gameData = gd;
|
||||
nextId = 0;
|
||||
nextId = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +62,6 @@ void Aliens::update()
|
||||
//qDebug() << i;
|
||||
//if (al.health < 0) emit AlienKill();
|
||||
float tmpdx,tmpdy,angl,arctg = 0;
|
||||
qDebug() <<"alien"<< i << " path index" << al.pathIndex << " pos" << al.pos;
|
||||
tmpdx = al.pos.x() - al.path.at(al.pathIndex).x();
|
||||
tmpdy = al.pos.y() - al.path.at(al.pathIndex).y();
|
||||
while (std::sqrt(tmpdx*tmpdx +tmpdy*tmpdy) < 2*al.speed)
|
||||
@@ -104,6 +102,7 @@ void Aliens::update()
|
||||
-al.speed*std::cos(arctg));
|
||||
//return true;
|
||||
gameData->curAliens.insert(al.Id,al);
|
||||
qDebug() <<"alien"<< i << " path index" << al.pathIndex << " pos" << al.pos;
|
||||
}
|
||||
for (int j=0; j<missIndex.size(); j++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user