mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 13:03:55 -07:00
arrows can target players; card attachment works
This commit is contained in:
parent
61b82bd6f9
commit
614f106304
32 changed files with 885 additions and 402 deletions
|
|
@ -2,14 +2,33 @@
|
|||
#define ARROWTARGET_H
|
||||
|
||||
#include "abstractgraphicsitem.h"
|
||||
#include <QList>
|
||||
|
||||
class Player;
|
||||
class ArrowItem;
|
||||
|
||||
class ArrowTarget : public AbstractGraphicsItem {
|
||||
protected:
|
||||
Player *owner;
|
||||
private:
|
||||
bool beingPointedAt;
|
||||
QList<ArrowItem *> arrowsFrom, arrowsTo;
|
||||
public:
|
||||
ArrowTarget(QGraphicsItem *parent = 0);
|
||||
ArrowTarget(Player *_owner, QGraphicsItem *parent = 0);
|
||||
~ArrowTarget();
|
||||
|
||||
Player *getOwner() const { return owner; }
|
||||
|
||||
void setBeingPointedAt(bool _beingPointedAt);
|
||||
bool getBeingPointedAt() const { return beingPointedAt; }
|
||||
|
||||
const QList<ArrowItem *> &getArrowsFrom() const { return arrowsFrom; }
|
||||
void addArrowFrom(ArrowItem *arrow) { arrowsFrom.append(arrow); }
|
||||
void removeArrowFrom(ArrowItem *arrow) { arrowsFrom.removeAt(arrowsFrom.indexOf(arrow)); }
|
||||
|
||||
const QList<ArrowItem *> &getArrowsTo() const { return arrowsTo; }
|
||||
void addArrowTo(ArrowItem *arrow) { arrowsTo.append(arrow); }
|
||||
void removeArrowTo(ArrowItem *arrow) { arrowsTo.removeAt(arrowsTo.indexOf(arrow)); }
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue