-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathGame.h
66 lines (59 loc) · 1.27 KB
/
Game.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
55
56
57
58
59
60
61
62
63
64
65
66
// Game.h: interface for the CGame class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GAME_H__4AA9A689_CFB1_456F_8C6D_EEFF69125C54__INCLUDED_)
#define AFX_GAME_H__4AA9A689_CFB1_456F_8C6D_EEFF69125C54__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Mill.h"
#include "Snake.h"
#include "resource.h"
#include <mmsystem.h>
#include <Digitalv.h>
#pragma comment(lib,"Msimg32.lib")
#pragma comment(lib,"winmm.lib")
extern HINSTANCE hInst;
class CGame
{
public:
void Load(LPTSTR name);
void Save(LPTSTR name);
void NotPause();
void Pause();
void CheckKey();
void MeamCart();
void BeginCart();
void OnEnd();
void ShowInfo();
void PlayMid(LPTSTR name);
void Destroy();
void OnPassLevel();
CPanel* GetPanel();
void OnLose();
void InitDraw();
void OnTimer(int ID);
void OnKeyUp(int key);
void OnKeyDown(int key);
void DrawScene();
void OnStart();
CGame();
virtual ~CGame();
private:
/*bool DownKey;
bool RightKey;
bool UpKey;
bool LeftKey;*/
bool m_isbegin;
int m_life;
UINT wDeviceID;
int m_Level;
HBITMAP swapBmp;
HDC swapDC;
HDC theDC;
CSnake* pSnake;
CPanel* pPanel;
CMill *pMill;
ETrend lastKey;
};
#endif // !defined(AFX_GAME_H__4AA9A689_CFB1_456F_8C6D_EEFF69125C54__INCLUDED_)