Last active
August 29, 2015 14:02
-
-
Save KT-Yeh/4ff4b9ed92f164b39fa6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef GAME_H | |
#define GAME_H | |
#include <QWidget> | |
#include <QPainter> | |
#include <QTimer> | |
#include <QPaintEvent> | |
#include <QKeyEvent> | |
#include "Man.h" | |
class Game : public QWidget { | |
Q_OBJECT | |
public: | |
Game(QWidget *parent = 0); | |
public slots: | |
void RefreshFrame(); | |
protected: | |
virtual void paintEvent(QPaintEvent *event); | |
virtual void keyPressEvent(QKeyEvent *event); | |
virtual void keyReleaseEvent(QKeyEvent *event); | |
private: | |
QTimer *timer; | |
Man *man; | |
}; | |
#endif // GAME_H |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment