Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef FX_TRAIL_H
  7. #define FX_TRAIL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "particle_util.h"
  12. #include "baseparticleentity.h"
  13. #include "particle_prototype.h"
  14. class C_ParticleTrail : public C_BaseParticleEntity, public IPrototypeAppEffect
  15. {
  16. public:
  17. DECLARE_CLASS( C_ParticleTrail, C_BaseParticleEntity );
  18. C_ParticleTrail( void );
  19. virtual ~C_ParticleTrail( void );
  20. void GetAimEntOrigin( IClientEntity *pAttachedTo, Vector *pAbsOrigin, QAngle *pAbsAngles );
  21. void SetEmit( bool bEmit );
  22. bool ShouldEmit( void ) { return m_bEmit; }
  23. void SetSpawnRate( float rate );
  24. // C_BaseEntity.
  25. public:
  26. virtual void OnDataChanged(DataUpdateType_t updateType);
  27. virtual void Start( CParticleMgr *pParticleMgr, IPrototypeArgAccess *pArgs );
  28. int m_nAttachment;
  29. float m_flLifetime; // How long this effect will last
  30. private:
  31. float m_SpawnRate; // How many particles per second.
  32. bool m_bEmit; // Keep emitting particles?
  33. TimedEvent m_ParticleSpawn;
  34. CParticleMgr *m_pParticleMgr;
  35. private:
  36. C_ParticleTrail( const C_ParticleTrail & );
  37. };
  38. #endif // FX_TRAIL_H