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

📄 player.h

📁 射击小游戏
💻 H
字号:
#ifndef PLAYER_H
#define PLAYER_H

#include "BaseObject.h"
#include "FighterPlane.h"
//****************************************************************
// 定义玩家战机定义
//****************************************************************
class Player:public FighterPlane
{
	double m_speed;//玩家移动速度的绝对值
	void Fire();//开火函数
public:
	Player(int x_value, int y_value);//构造函数
	int m_iKillEnermy, m_iScore;//杀敌数,分数
	int m_iChances;//复活机会
	//动作指令定义
	enum ACTION { GO_LEFT, GO_UP, GO_RIGHT, GO_DOWN, GO_LEFT_UP, GO_LEFT_DOWN, GO_RIGHT_UP, GO_RIGHT_DOWN, STOP_MOVING, START_FIRING, STOP_FIRING, CHANGE_WEAPON};
	void Update();//更新函数
	void ChangeWeapon();//更换武器
	void Action(ACTION NewAction);//执行动作指令
};

#endif

⌨️ 快捷键说明

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