forked from Haroooold/motaGroup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbusiness.h
47 lines (40 loc) · 1.1 KB
/
business.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* File: business.h
* ----------------
* This file exports a class <code>business</code>. Business frame would
* include several <code>Button</code>. Mouse event would be realized first,
* key Event would be considered later.
* Things could be bought from businessman(each costs $50):
* HP +100
* ATK +5
* DEF +5
* EXP +100
* TO Do: you would get a random key after you have consumed $100 with
* [90% nothing, 9% yellow key, 0.9% blue key, 0.1% red key].
*/
#ifndef BUSINESS_H
#define BUSINESS_H
#include <QObject>
#include "Button.h"
#include "Hero.h"
#include "Game.h"
extern Game* game;
class business: public QObject
{ Q_OBJECT
public:
// constructor
business(Hero* hero, Game* game);
public slots:
void addHp();
void addATK();
void addDEF();
void addEXP();
void back();
private:
// private variables
int hpAddValue, atkAddValue, defAddValue, expAddValue;
Button* addHPButton,* addATKButton,* addDEFButton,* addEXPButton,* backButton;
QGraphicsRectItem* businessFrame;
QGraphicsTextItem* businessText;
};
#endif // BUSINESS_H