enemyplane.h

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

H
52
字号
// EnemyPlane.h: interface for the CEnemyPlane class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ENEMYPLANE_H__0B030668_3486_46F3_B24C_4B7D89C12649__INCLUDED_)
#define AFX_ENEMYPLANE_H__0B030668_3486_46F3_B24C_4B7D89C12649__INCLUDED_

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

#include "Plane.h"
#include "Explode.h"
#include "EnemyBullet.h"
#include "Bonus.h"

class CEnemyPlane : public CPlane  
{
public:
	CEnemyPlane(CDirectWnd *win,
				CObList *ObList,
				int px,
				int py,
				int xspd,
				int yspd,
				int etype,
				int elife);
	virtual ~CEnemyPlane();
	void LoadPic();
	void Action();
	void getInform();
	void Move();
	void Fire();
	int getScore() { return score; }
	int getDead() { return dead; }
	int getEnemyType() { return enemyType; }

public:
	LPDIRECTDRAWSURFACE EnemyPic;

private:
	int enemyType;                // 敌机类型
	int bulletNum;                // 敌机一次发出的子弹数量
	int firetime;
	int firetime1;
	int firetime2;
	int score;					  // 分数
	int dead;                     // 0:活着 1:死亡
};

#endif // !defined(AFX_ENEMYPLANE_H__0B030668_3486_46F3_B24C_4B7D89C12649__INCLUDED_)

⌨️ 快捷键说明

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