You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
650 B
30 lines
650 B
#ifndef COLLISION_H
|
|
#define COLLISION_H
|
|
|
|
|
|
#include <QMutex>
|
|
#include <QWidget>
|
|
#include <QString>
|
|
#include "player.h"
|
|
#include "enemybase.h"
|
|
|
|
class EnemyCollision: public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
EnemyCollision(QObject* parent = nullptr);
|
|
~EnemyCollision();
|
|
void setupCollision(Player* player, QList<EnemyBase*> *enemyList);
|
|
void player_enemyCollision(Player &mPlayer,QList<EnemyBase*> &mEnemyList);//玩家与敌人碰撞检测
|
|
private:
|
|
Player* mPlayer;
|
|
QList<EnemyBase*>* mEnemyList;
|
|
signals:
|
|
void EnemyCollisionFinished(const QString str);
|
|
public slots:
|
|
void processCollisions();
|
|
};
|
|
|
|
#endif // COLLISION_H
|