-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShop.h
55 lines (50 loc) · 812 Bytes
/
Shop.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
48
49
50
51
52
53
54
#pragma once
#include "include.h"
extern int _WAIT[]; // 商店冷却
class PlantSelector
{
private:
int pid;
public:
PlantSelector();
~PlantSelector();
void reinit();
void move(int direction);
void setPant(int pid);
int getPlant() const;
};
class MapSelector
{
private:
Pos pos;
public:
MapSelector();
~MapSelector();
void reinit();
void move(int direction);
Pos getPos() const;
};
class Shop
{
private:
PlantSelector ps;
MapSelector ms;
int status; // 0选择植物,1选择地图位置,2购买植物冲突
int* wait_time;
int buyPlant(int sure);
public:
Shop();
~Shop();
void reinit(int regame);
// 选定植物
void choosePlant();
// 取消选定植物
void unchoosePlant();
// 进行操作
void shopOperate(int key);
// 冷却
void wait();
//显示商店信息
friend void showShop();
friend void fixShop();
};