blob: c42f961cd27757afbf5eab1b3e603db286a1f391 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <QGraphicsScene>
#include <QApplication>
#include <QDebug>
#include "BasicEnemy.h"
BasicEnemy::BasicEnemy(QGraphicsScene* scene, QPointF pos, QGraphicsItem* parent)
: Character(parent, scene)
{
m_velocityY = 0;
m_velocityX = 1;
setPos(pos);
setZValue(2);
setShapeMode(QGraphicsPixmapItem::MaskShape);
}
BasicEnemy::~BasicEnemy()
{
}
void BasicEnemy::advance(int phase)
{
if(phase == 0)
return;
if(m_state == STATE_DEAD)
{
qDebug() << "this baddy be dead now";
removeMe();
}
if(phase == 1)
{
return;
}
}
|