forked from kn0w0n3/Super_Mario
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoomba.h
39 lines (33 loc) · 775 Bytes
/
goomba.h
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
39
/*
* Author: equati0n
* Date: December 2016
*/
#ifndef GOOMBA_H
#define GOOMBA_H
#include <QGraphicsItem>
#include <QPixmap>
#include "objecttype.h"
#include <QTimer>
#include <QObject>
#include <typeinfo>
#include <QGraphicsScene>
class Goomba : public QObject, public QGraphicsItem
{
Q_OBJECT
public:
enum { Type = UserType + goombaType };
Goomba(QRectF platformRect, int direction,QGraphicsItem *parent = 0);
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
int type() const;
public slots:
void nextFrame();
signals:
void marioSizeStatus(int);
private:
int mCurrentFrame3;
QPixmap mPixmap3;
QRectF mPlatform;
int mDirection;
};
#endif // GOOMBA_H