You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
255 B

#include "bullet.h"
#include <QTimer>
Bullet::Bullet()
{
setRect(0,0,10,50);
QTimer* timer = new QTimer();
connect(timer, SIGNAL(timeout()), this, SLOT(move()));
timer->start(50);
}
void Bullet::move()
{
this->setPos(x(), y()-10);
}