bullet.h

来自「一个打飞机的小游戏的源代码」· C头文件 代码 · 共 39 行

H
39
字号
// Bullet.h: interface for the CBullet class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BULLET_H__6DEC8C55_F409_4940_BDCA_9CA030053323__INCLUDED_)
#define AFX_BULLET_H__6DEC8C55_F409_4940_BDCA_9CA030053323__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "BaseObj.h"

struct BulletAttr
{
	int power;
	int width;
	int height;
};

class CBullet : public CBaseObj  
{
public:
	CBullet(CDirectWnd *win,CObList *ObList);
	virtual ~CBullet();
	void LoadPic(){};
	void Action(){};
	int getPower() { return power; }
	void setPower(int p) { power = p; }

public:
	LPDIRECTDRAWSURFACE BulletPic;
protected:
	int bulletType;			// 子弹类型
	int power;				// 子弹威力
};

#endif // !defined(AFX_BULLET_H__6DEC8C55_F409_4940_BDCA_9CA030053323__INCLUDED_)

⌨️ 快捷键说明

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