mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -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
|
|
@ -1,10 +1,20 @@
|
|||
#include "arrowtarget.h"
|
||||
#include "arrowitem.h"
|
||||
#include "player.h"
|
||||
|
||||
ArrowTarget::ArrowTarget(QGraphicsItem *parent)
|
||||
: AbstractGraphicsItem(parent), beingPointedAt(false)
|
||||
ArrowTarget::ArrowTarget(Player *_owner, QGraphicsItem *parent)
|
||||
: AbstractGraphicsItem(parent), owner(_owner), beingPointedAt(false)
|
||||
{
|
||||
}
|
||||
|
||||
ArrowTarget::~ArrowTarget()
|
||||
{
|
||||
while (!arrowsFrom.isEmpty())
|
||||
arrowsFrom.first()->getPlayer()->delArrow(arrowsFrom.first()->getId());
|
||||
while (!arrowsTo.isEmpty())
|
||||
arrowsTo.first()->getPlayer()->delArrow(arrowsTo.first()->getId());
|
||||
}
|
||||
|
||||
void ArrowTarget::setBeingPointedAt(bool _beingPointedAt)
|
||||
{
|
||||
beingPointedAt = _beingPointedAt;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue