build_towers
This commit is contained in:
@@ -28,12 +28,24 @@ AD_Graphics::~AD_Graphics()
|
||||
delete scene;
|
||||
}
|
||||
|
||||
|
||||
void AD_Graphics::mouseDoubleClickEvent(QMouseEvent *)
|
||||
{
|
||||
core->nextWave();
|
||||
}
|
||||
|
||||
|
||||
void AD_Graphics::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::LeftButton)
|
||||
core->adtowers->addTower(0,1,(QPointF(event->pos())/cellSize-QPointF(0.5,0.5)).toPoint());
|
||||
if (event->button() == Qt::RightButton)
|
||||
core->adtowers->addTower(0,0,(QPointF(event->pos())/cellSize-QPointF(0.5,0.5)).toPoint());
|
||||
if (event->button() == Qt::MidButton)
|
||||
core->adtowers->delTower((QPointF(event->pos())/cellSize-QPointF(0.5,0.5)).toPoint());
|
||||
}
|
||||
|
||||
|
||||
void AD_Graphics::timerEvent(QTimerEvent * )
|
||||
{
|
||||
//qDebug() << data->curAliens.size();
|
||||
|
||||
Reference in New Issue
Block a user