?? globalobject.h
字號(hào):
#pragma once
#include "role.h"
#include "fight.h"
#include <vector>
using namespace std;
//用于在不同情況下要顯示的信息
typedef struct _SCENARIO_INFO{
int nType; //取值1開始,2死亡,3退出,4結(jié)束
int nLength;
char * strInfor;
}SCENARIO_INFO, * LPSCENARIO_INFO;
#define EQUIP_WEAPON 1
#define EQUIP_SHIELD 2
typedef struct _ROLE_EQUIP {
int nType;
char * strName;
int nAttribute;
}ROLE_EQUIP, *LPROLE_EQUIP;
#define GOODS_DURATIVE 3
#define GOODS_INSTANTANEOUS 4
typedef struct _ROLE_GOODS {
int nType;
char * strName;
int nAttribute;
int nNumber;
}ROLE_GOODS, *LPROLE_GOODS;
//游戲可能處于的狀態(tài)為在地圖上走,戰(zhàn)斗,退出,死亡,結(jié)束
#define GS_MAP 1
#define GS_FIGHT 2
#define GS_QUIT 3
#define GS_DIE 4
#define GS_OVER 5
class CGlobalObject
{
public:
CGlobalObject(void);
~CGlobalObject(void);
void SetColor(unsigned short ForeColor=7,unsigned short BackGroundColor=0);
void DrawSword();
void HelpString(char * strFormer,char cName, char * strInfor);
void PlayString(int nSleepTime, char * pString , int nStringLength);
public:
vector<SCENARIO_INFO> m_vecScenarioInfo;
vector<ROLE_EQUIP> m_vecEquip;
vector<ROLE_GOODS> m_vecGoods;
vector<CRole> m_vecNpc;
CRole m_protagonist;
int m_nGameStart;
CFight m_fight;
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -