saintfighter.h

来自「一个完整的2D滚屏游戏示例」· C头文件 代码 · 共 75 行

H
75
字号
#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 + =
减小字号Ctrl + -
显示快捷键?