📄 csplash.h
字号:
#ifndef CSPLASH_H
#define CSPLAHS_H
#include "CRender.h"
#include "CSound.h"
#include "g_info.h"
#include <list>
using namespace std;
enum e_SplashBrickDirection
{
SPLASH_LEFT = 0,
SPLASH_RIGHT,
SPLASH_UP,
SPLASH_DOWN
};
enum { SplashBrickTypeCount = 8, SplashBrickStateCount = 7 };
class CSplashBrick
{
public:
CSplashBrick( HGE *hgeEngine , hgeResourceManager *resMgr );
bool Init();
void Release();
bool Update();
void Render();
void Play() { m_exist = true; }
bool IsAlive() { return m_exist; }
private:
HGE *m_hgeEngine;
hgeResourceManager *m_resMgr;
hgeSprite *m_SplashBrick;
float m_x;
float m_y;
float m_vx;
float m_vy;
int m_color;
int m_state;
int m_direction;
bool m_exist;
};
//==============================================================
//==============================================================
class CSplash
{
public:
CSplash( HGE *hgeEngine , hgeResourceManager *resMgr );
bool Init();
void Release();
bool Update();
void Render( HTARGET target = 0 );
private:
HGE *m_hgeEngine;
hgeResourceManager *m_resMgr;
CRender *m_render;
HEFFECT m_SplashBomb;
HEFFECT m_SplashExpl;
HCHANNEL m_SplashchlBomb;
list<CSplashBrick*> m_SplashBrick;
bool m_ExplState;
float m_beginTime;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -