Commit 3d3fddfb by grlabu

Upload New File

parent 741cd376
Showing with 53 additions and 0 deletions
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QString>
#include "Header.h"
#include "gamescreen.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
namespace MainWindow_NS {
static const char GAME_SAVES_FILENAME[] = "GameSaves.txt";
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr, Player *player = nullptr, int iDefeatedEnemies = 0);
~MainWindow();
void createEnemy(); // Declare createEnemy as public
int getPlayerHp() const;
void setPlayerHp(int newPlayerHp);
private slots:
void on_nupp_rynda_clicked();
void on_nupp_jook_clicked(); // Slot for the "Use Potion" button click event
void on_nupp_pogene_clicked();
void switchToGameScreen(); // Declare the function to switch to the game screen
private:
Ui::MainWindow *ui;
Player *p;
Enemy enemy;
gamescreen *gameScreen;
int defeatedEnemies;
int specialAttack;
void createPlayer();
void createPlayer(Player *player);
void levelUp();
void displayOutput(const QString &output);
void saveGame();
int usePotion(Player* p, int currentHealth);
void bossFightLastPhase();
};
#endif // MAINWINDOW_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment