⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saintfighter.h

📁 一个完整的2D滚屏游戏示例
💻 H
字号:
#ifndef _SAINTFIGHTER_H
#define _SAINTFIGHTER_H

#include "Spirit.h"
#include "DD.h"

class CBackground;
class CPalaceGate;
class CSaintFighter;
class CStone;



////////////////////////////////////////////////////////////////////////////
class CBackground  : public CSpirit
{
public:
	int m_nLoopTime;//重复循环的次数;
	
	int	m_nX2,m_nY2;	//背景是多图拼出来的;//现在只是两图而已;不然要用数组才好;
	RECT m_rcSource2;	//背景是多图拼出来的;//现在只是两图而已;不然要用数组才好;

public:
bool m_bAtPalace; 

public:
CBackground();
virtual void Trace(long unsigned int luTime,CPalaceGate PalaceGate); //luTimer-system time record;
bool Show(CDD* pDD);
}; 

/////////////////////////////////////////////////////////////////////////////////////////////////
class CPalaceGate : public CSpirit
{
public:
int	m_nXGate,m_nYGate;
RECT m_rcGate; 
RECT m_rcDestination; 
public:
CPalaceGate();
virtual void Trace(long unsigned int luTime,CBackground Background); //luTimer-system time record			 
bool Show(CDD* pDD);
};

////////////////////////////////////////////////////////////////////////////
class CSaintFighter : public CSpirit
{
public:
bool   m_bFiring;         //while the saintfighter is shotting,this paremeter be true.
public:
};

////////////////////////////////////////////////////////////////////////
class CCosmos:public CSpirit
{
public:
	    CCosmos();
	    void Activate(int nSrcLeft,int nSrcTop,int nY);
virtual void Trace(CSpirit spirit);
};

////////////////////////////////////////////////////////////////////////
class CStone: public CSpirit
{
public:
	CStone();
	virtual void Trace(int i);
};






#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -