summaryrefslogtreecommitdiffstats
path: root/labb4/Hero.cpp
blob: 2d3b12e2300a9b6c291b6fc99881caaf7a4e8321 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Copyright (C) David Wolfe, 1999.  All rights reserved.
 * Ported to Qt and adapted for TDDD86, 2015.
 */

#include "Hero.h"
#include "constants.h"

Hero::Hero() : Unit() {}

void Hero::draw(QGraphicsScene *scene) const {
    Point corner = asPoint();
    scene->addRect(QRectF(corner.x * UNIT_WIDTH, corner.y * UNIT_HEIGHT,
                          UNIT_WIDTH, UNIT_HEIGHT), Qt::NoPen, QBrush(HERO_COLOR));
}