File indexing completed on 2024-05-12 04:03:07

0001 /*
0002     SPDX-FileCopyrightText: 2007-2008 Fela Winkelmolen <fela.kde@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef GAMEENGINE_H
0008 #define GAMEENGINE_H
0009 
0010 // Qt
0011 #include <QObject>
0012 
0013 class LevelLoader;
0014 
0015 class GameEngine : public QObject
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit GameEngine(QObject *parent = nullptr);
0020     ~GameEngine() override;
0021 
0022 public Q_SLOTS:
0023     void start(const QString &levelset);
0024     void loadNextLevel();
0025 
0026 Q_SIGNALS:
0027     void loadingNewGame();
0028     void newLine(const QString &line, int lineNumber);
0029     void newGift(const QString &gift, int times, const QString &pos);
0030     void ready();
0031 
0032 private:
0033     void deleteAllObjects();
0034 
0035     LevelLoader *m_levelLoader;
0036 
0037 private Q_SLOTS:
0038     void loadLevel();
0039 };
0040 
0041 #endif // GAMEENGINE_H