-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e4b76d
commit 03df2e2
Showing
63 changed files
with
2,535 additions
and
2,679 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
#ifndef BULLET_H | ||
#define BULLET_H | ||
// Copyright 2022 Flying-Tom | ||
#ifndef INCLUDE_BULLET_BULLET_H_ | ||
#define INCLUDE_BULLET_BULLET_H_ | ||
|
||
#include <common.h> | ||
#include <enemy/enemy.h> | ||
#include <map.h> | ||
#include <gamemap.h> | ||
|
||
class Bullet : public QObject, public QGraphicsItem { | ||
Q_OBJECT | ||
Q_INTERFACES(QGraphicsItem) | ||
public: | ||
Bullet(); | ||
QRectF boundingRect() const override; | ||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override; | ||
void advance(int phase) override; | ||
enum { Type = UserType + 4 }; | ||
int type() const override; | ||
virtual void moveForward(); | ||
Q_OBJECT | ||
Q_INTERFACES(QGraphicsItem) | ||
public: | ||
Bullet(); | ||
QRectF boundingRect() const override; | ||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, | ||
QWidget* widget) override; | ||
void advance(int phase) override; | ||
enum { Type = UserType + 4 }; | ||
int type() const override; | ||
virtual void moveForward(); | ||
|
||
protected: | ||
QImage image; | ||
qreal atk; | ||
qreal speed; | ||
protected: | ||
QImage image; | ||
qreal atk; | ||
qreal speed; | ||
}; | ||
|
||
#endif // BULLET_H | ||
#endif // INCLUDE_BULLET_BULLET_H_ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
#ifndef GUNBULLET_H | ||
#define GUNBULLET_H | ||
// Copyright 2022 Flying-Tom | ||
#ifndef INCLUDE_BULLET_GUNBULLET_H_ | ||
#define INCLUDE_BULLET_GUNBULLET_H_ | ||
|
||
#include "bullet.h" | ||
#include "enemy/enemy.h" | ||
#include <bullet/bullet.h> | ||
#include <enemy/enemy.h> | ||
|
||
class GunBullet : public Bullet { | ||
public: | ||
GunBullet(qreal atk); | ||
QRectF boundingRect() const override; | ||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override; | ||
void advance(int phase) override; | ||
void moveForward() override; | ||
public: | ||
explicit GunBullet(qreal atk); | ||
QRectF boundingRect() const override; | ||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, | ||
QWidget* widget) override; | ||
void advance(int phase) override; | ||
void moveForward() override; | ||
}; | ||
|
||
#endif // GUNBULLET_H | ||
#endif // INCLUDE_BULLET_GUNBULLET_H_ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
#ifndef LASER_H | ||
#define LASER_H | ||
// Copyright 2022 Flying-Tom | ||
#ifndef INCLUDE_BULLET_LASER_H_ | ||
#define INCLUDE_BULLET_LASER_H_ | ||
|
||
#include "bullet.h" | ||
#include "enemy/enemy.h" | ||
#include <bullet/bullet.h> | ||
#include <enemy/enemy.h> | ||
|
||
class Laser : public Bullet { | ||
public: | ||
Laser(GameItem* parent, qreal atk); | ||
~Laser(); | ||
QRectF boundingRect() const override; | ||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override; | ||
void advance(int phase) override; | ||
public: | ||
Laser(GameItem* parent, qreal atk); | ||
~Laser(); | ||
QRectF boundingRect() const override; | ||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, | ||
QWidget* widget) override; | ||
void advance(int phase) override; | ||
|
||
protected: | ||
GameItem* parent; | ||
int counter; | ||
protected: | ||
GameItem* parent; | ||
int counter; | ||
}; | ||
|
||
#endif // LASER_H | ||
#endif // INCLUDE_BULLET_LASER_H_ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
#ifndef MISSILE_H | ||
#define MISSILE_H | ||
// Copyright 2022 Flying-Tom | ||
#ifndef INCLUDE_BULLET_MISSILE_H_ | ||
#define INCLUDE_BULLET_MISSILE_H_ | ||
|
||
#include "bullet.h" | ||
#include <bullet/bullet.h> | ||
|
||
class Missile : public Bullet { | ||
public: | ||
Missile(QPointer<GameItem> atkTarget, qreal atk); | ||
~Missile(); | ||
QRectF boundingRect() const override; | ||
QPainterPath shape() const override; | ||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override; | ||
void advance(int phase) override; | ||
void moveForward() override; | ||
void bombing(); | ||
public: | ||
Missile(QPointer<GameItem> atkTarget, qreal atk); | ||
~Missile(); | ||
QRectF boundingRect() const override; | ||
QPainterPath shape() const override; | ||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, | ||
QWidget* widget) override; | ||
void advance(int phase) override; | ||
void moveForward() override; | ||
void bombing(); | ||
|
||
private: | ||
QPointer<GameItem> atkTarget; | ||
qreal atkAngle; | ||
private: | ||
QPointer<GameItem> atkTarget; | ||
qreal atkAngle; | ||
|
||
QGraphicsEllipseItem* bombArea; | ||
bool isBombing; | ||
qreal bombRadius; | ||
QMovie movie; | ||
QGraphicsEllipseItem* bombArea; | ||
bool isBombing; | ||
qreal bombRadius; | ||
QMovie movie; | ||
}; | ||
|
||
#endif // MISSILE_H | ||
#endif // INCLUDE_BULLET_MISSILE_H_ |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
#ifndef BLACKWARRIOR_H | ||
#define BLACKWARRIOR_H | ||
// Copyright 2022 Flying-Tom | ||
#ifndef INCLUDE_ENEMY_BLACKWARRIOR_H_ | ||
#define INCLUDE_ENEMY_BLACKWARRIOR_H_ | ||
|
||
#include "enemy.h" | ||
#include "game.h" | ||
#include <enemy/enemy.h> | ||
#include <game.h> | ||
|
||
class BlackWarrior : public Enemy { | ||
public: | ||
BlackWarrior(Game* game, QList<QPointF>& path); | ||
QPainterPath shape() const override; | ||
public: | ||
BlackWarrior(Game* game, QList<QPointF>* path); | ||
QPainterPath shape() const override; | ||
}; | ||
|
||
#endif // BLACKWARRIOR_H | ||
#endif // INCLUDE_ENEMY_BLACKWARRIOR_H_ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
#ifndef COWARDPLANE_H | ||
#define COWARDPLANE_H | ||
// Copyright 2022 Flying-Tom | ||
#ifndef INCLUDE_ENEMY_COWARDPLANE_H_ | ||
#define INCLUDE_ENEMY_COWARDPLANE_H_ | ||
|
||
#include "enemy.h" | ||
#include "game.h" | ||
#include <enemy/enemy.h> | ||
#include <game.h> | ||
|
||
class CowardPlane : public Enemy { | ||
public: | ||
CowardPlane(Game* game, QList<QPointF>& path); | ||
QPainterPath shape() const override; | ||
void advance(int phase) override; | ||
public: | ||
CowardPlane(Game* game, QList<QPointF>* path); | ||
QPainterPath shape() const override; | ||
void advance(int phase) override; | ||
}; | ||
|
||
#endif // COWARDPLANE_H | ||
#endif // INCLUDE_ENEMY_COWARDPLANE_H_ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
#ifndef DRAGON_H | ||
#define DRAGON_H | ||
// Copyright 2022 Flying-Tom | ||
#ifndef INCLUDE_ENEMY_DRAGON_H_ | ||
#define INCLUDE_ENEMY_DRAGON_H_ | ||
|
||
#include "enemy.h" | ||
#include "game.h" | ||
#include <enemy/enemy.h> | ||
#include <game.h> | ||
|
||
class Dragon : public Enemy { | ||
public: | ||
Dragon(Game* game, QList<QPointF>& path); | ||
~Dragon(); | ||
QRectF boundingRect() const override; | ||
QPainterPath shape() const override; | ||
public: | ||
Dragon(Game* game, QList<QPointF>* path); | ||
~Dragon(); | ||
QRectF boundingRect() const override; | ||
QPainterPath shape() const override; | ||
}; | ||
|
||
#endif // DRAGON_H | ||
#endif // INCLUDE_ENEMY_DRAGON_H_ |
Oops, something went wrong.