Skip to content

Instantly share code, notes, and snippets.

@shibbo
Created July 15, 2017 13:41
Show Gist options
  • Save shibbo/3062e138055cf17c52476b3f1bb5adf4 to your computer and use it in GitHub Desktop.
Save shibbo/3062e138055cf17c52476b3f1bb5adf4 to your computer and use it in GitHub Desktop.
#ifndef OBJECT_H
#define OBJECT_H
#include <QRect>
#include <QPainter>
class Object
{
public:
Object();
//virtual ~Object();
//virtual void draw(QPainter*)=0;
qint16 getx() const { return x; }
qint16 gety() const { return y; }
qint16 getWidth() const { return width; }
qint16 getHeight() const { return height; }
QRect getRect() const { return QRect(x, y, width, height); }
void setx(qint16 x) { this->x= x; }
void sety(qint16 y) { this->y = y; }
void setWidth(qint16 width) { this->width = width; }
void setHeight(qint16 height) { this->height = height; }
protected:
qint16 x, y;
qint16 width, height;
qint16 offsetx, offsety;
};
#include "sprite.h"
#include "entrance.h"
#include "location.h"
#include "zone.h"
#include "path.h"
#include "pathnode.h"
#endif // OBJECT_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment