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.
24 lines
469 B
24 lines
469 B
#ifndef TOWER_H |
|
#define TOWER_H |
|
|
|
#include <QGraphicsPixmapItem> |
|
#include <QGraphicsPolygonItem> |
|
#include <QPointF> |
|
#include <QObject> |
|
|
|
class Tower : public QObject, public QGraphicsPixmapItem { |
|
Q_OBJECT |
|
public: |
|
Tower(QGraphicsItem *parent=0); |
|
double distanceTo(QGraphicsItem *item); |
|
void fire(); |
|
public slots: |
|
|
|
void aquire_target(); |
|
private: |
|
QGraphicsPolygonItem *attack_area; |
|
QPointF attack_dest; |
|
bool has_target; |
|
}; |
|
|
|
#endif // TOWER_H
|
|
|