Particle.h
上传用户:hkb425
上传日期:2007-06-16
资源大小:34191k
文件大小:1k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. // Particle.h: interface for the CParticle class.
  2. //作者:吴雪平  2002-6-17日修改
  3. //粒子系统,实现爆炸、炊烟
  4. //////////////////////////////////////////////////////////////////////
  5. #if !defined(AFX_PARTICLE_H__75C8B7C1_DB9B_11D5_AD18_444553540000__INCLUDED_)
  6. #define AFX_PARTICLE_H__75C8B7C1_DB9B_11D5_AD18_444553540000__INCLUDED_
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10. #include "structdef.h"
  11. class CParticle  
  12. {
  13. public:
  14. CParticle();
  15. virtual ~CParticle();
  16.     bool     InitParticle(int type,VERTEX startPos=VERTEX(0,0,0),unsigned int *texResource=NULL);
  17. void     DrawParticles(VERTEX position=VERTEX(0,0,0));
  18. private:
  19. void     DrawShotParticles();
  20. void     DrawBulletParticles(VERTEX position);
  21. void     DrawExpParticles();
  22. void     DrawSmokeParticles();
  23. bool     InitShotParticle();
  24. bool     InitBulletParticle(VERTEX position);
  25. bool     InitExpParticle();
  26. bool     InitSmokeParticle();
  27.     void     ResetParticle(int ParticleID,VERTEX position);
  28.     void     ResetSmokeParticle(int ParticleID);
  29. PARTICLE     *particle;
  30. int           Type;
  31. float         srccolor[27][3];
  32. int           maxnum;
  33. int           smokenum;
  34. int           rocknum;
  35. static unsigned int *m_pTexResource;
  36. };
  37. #endif // !defined(AFX_PARTICLE_H__75C8B7C1_DB9B_11D5_AD18_444553540000__INCLUDED_)