aboutsummaryrefslogtreecommitdiff
path: root/src/BasicEnemy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/BasicEnemy.cpp')
-rw-r--r--src/BasicEnemy.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/BasicEnemy.cpp b/src/BasicEnemy.cpp
new file mode 100644
index 0000000..c42f961
--- /dev/null
+++ b/src/BasicEnemy.cpp
@@ -0,0 +1,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;
+ }
+}