#ifndef COLLISION_H #define COLLISION_H #include #include #include #include "player.h" #include "enemybase.h" class EnemyCollision: public QObject { Q_OBJECT public: EnemyCollision(QObject* parent = nullptr); ~EnemyCollision(); void setupCollision(Player* player, QList *enemyList); void player_enemyCollision(Player &mPlayer,QList &mEnemyList);//玩家与敌人碰撞检测 private: Player* mPlayer; QList* mEnemyList; signals: void EnemyCollisionFinished(const QString str); public slots: void processCollisions(); }; #endif // COLLISION_H