ctank.h

来自「C人工智能游戏开发的一些实例源代码 C Game development in 」· C头文件 代码 · 共 30 行

H
30
字号
//Tanks
//Copyright John Manslow
//29/09/2001

#ifndef _CTank_
#define _CTank_

class CProjectile;

class CTank
{
public:
	//The tank's position is set up in the world class so don't pass the constructor
	//anything
	CTank();
	~CTank();

	//Returns 1 if a collision has occurred between this tank and the specified projectile
	//in the last time step. Returns 0 otherwise.
	int nTestForProjectileTankCollision(const CProjectile * const);

	//The tank's position
	double dxPosition,dyPosition;

	//The angle of its barrrel (in polar and rectangular form)
	double dInclination;
	double dBarrelx,dBarrely;
};

#endif

⌨️ 快捷键说明

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