extractorbuilding.h

来自「这是整套横扫千军3D版游戏的源码」· C头文件 代码 · 共 42 行

H
42
字号
#ifndef __EXTRACTOR_BUILDING_H__
#define __EXTRACTOR_BUILDING_H__

#include "Building.h"

class CExtractorBuilding : public CBuilding {
public:
	CR_DECLARE(CExtractorBuilding);
	CR_DECLARE_SUB(MetalSquareOfControl);

	CExtractorBuilding();
	virtual ~CExtractorBuilding();
	void PostLoad();

	void ResetExtraction();
	void SetExtractionRangeAndDepth(float range, float depth);
	void ReCalculateMetalExtraction();
	void AddNeighboor(CExtractorBuilding* neighboor);
	void RemoveNeighboor(CExtractorBuilding* neighboor);

	float GetExtractionRange() const { return extractionRange; }
	float GetExtractionDepth() const { return extractionDepth; }

	virtual void FinishedBuilding();

protected:
	struct MetalSquareOfControl {
		CR_DECLARE_STRUCT(MetalSquareOfControl);
		int x;
		int z;
		float extractionDepth;
	};

	float extractionRange, extractionDepth;
	std::list<MetalSquareOfControl*> metalAreaOfControl;
	std::list<CExtractorBuilding*> neighbours;

	static float maxExtractionRange;
};

#endif // __EXTRACTOR_BUILDING_H__

⌨️ 快捷键说明

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