StatePlay.h
上传用户:jalin138
上传日期:2022-02-12
资源大小:5720k
文件大小:1k
- #pragma once
- #include "CbuttonFont.h"
- #include<vector>
- #include "state.h"
- #include "SceneManage.h"
- #include "Sprite.h"
- struct ST_GAME_PLAY
- {
- int size;
- float width;
- float score;
- int nChoice1;
- int nChoice2;
- int check_sum;
- int spr_sum;
- void SetZero()
- {
- size = 0;
- check_sum = 0;
- spr_sum = 0;
- width = 0.0f;
- nChoice1 = 0;
- nChoice2 = 0;
- score = 0;
- }
- };
- enum EN_PLAY
- {
- PLAY_COMMEND = 0,
- PLAY_CHANGE,
- PLAY_CHACK_DEL
- };
- enum EN_WAY
- {
- WAY_UP = 0,
- WAY_DOWN,
- WAY_LEFT,
- WAY_RIGHT
- };
- const int g_vector = 144;
- class CStatePlay : public CState
- {
- public:
- CStatePlay(void);
- virtual ~CStatePlay(void);
- // 逻辑实现
- virtual bool Logic(void);
- // 渲染实现
- virtual void Render(void);
- // 场景切换,返回true时退出游戏
- virtual bool Handle(CSceneManage *_SceneManage);
- public:
- // 初始化游戏数据
- void InitializeDate(void);
- void DrawLine(void);
- protected:
- CSprite *m_vSprite[g_vector]; //精灵
- ST_GAME_PLAY *m_pPlay; //游戏属性数据
- CSceneManage *m_pPlayManage; //操作管理
- Cbutton *m_pButton;
- GfxFont *m_pFont;
- };