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

📄 puff.h

📁 《BATTLE OF SKY》
💻 H
字号:
// definition of class Puff

#ifndef PUFF_H
#define PUFF_H

#include "bitmap.h"
#include "direction.h"
#include "bomb.h"

//
//class Puff
//

class Puff {
public:
	Puff(SimpleWindow &w) ;
	void Draw() ;
	void Erase() ;
	
	//inspector
	Position GetPosition() const ;
	Direction GetDirection() const ;
	float GetHorizMovement() const ;
	float GetVertMovement() const ;
	BitMap& GetBmp(const Direction &d) ;
	const BitMap& GetBmp(const Direction &d) const;
	SimpleWindow& GetWindow() const ;
	
	//mutator
	void SetPosition(const Position &p) ;
	void SetDirection(const Direction &d) ;
    void SetHorizMovement(float h);
	void SetVertMovement(float v);
	Position NewPosition() const;
	void Move() ;
	bool AtRightEdge() const;
	bool AtLeftEdge() const;
	bool AtBottomEdge() const;
	bool AtTopEdge() const; 

	// facilitor
	void Shot() ;

private:
	// data members
	SimpleWindow &GameWindow ;
	Position CurrentPosition ;
	Direction CurrentDirection ;
	float HorizMovement ;
	float VertMovement ;
	vector<BitMap> PuffPhoto ;
};
	
#endif

⌨️ 快捷键说明

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