www.pudn.com > MyGame.rar > BulletFireBall.h


// BulletFireBall.h: interface for the CBulletFireBall class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_BULLETFIREBALL_H__BB23DF24_F9B0_4856_9508_8639823A659C__INCLUDED_) 
#define AFX_BULLETFIREBALL_H__BB23DF24_F9B0_4856_9508_8639823A659C__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "Bullet.h" 
 
class CBulletFireBall : public CBullet   
{ 
public: 
	CBulletFireBall(); 
	virtual ~CBulletFireBall(); 
	// 根据给定的位置和方向进行构造 
	CBulletFireBall(const Point3f &_p, const float _angle) 
		:CBullet(_p,_angle){ttl=3000;} 
	// 根据给定的位置、方向和速度进行构造 
	CBulletFireBall(const Point3f &_p, const float _angle, const Point3f &_v) 
			:CBullet(_p,_angle,_v){ttl=3000;} 
	int Draw(); 
 
	void Update(int t) 
	{ 
		if(ttl<1000)  
		{ 
			B.r=(1000-ttl)/50.0; 
			v=Point3f(0,0,0); 
		} 
		CBullet::Update(t); 
	} 
}; 
 
#endif // !defined(AFX_BULLETFIREBALL_H__BB23DF24_F9B0_4856_9508_8639823A659C__INCLUDED_)