smokesimulation.c 966 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. class SmokeSimulation : Managed
  2. {
  3. protected Particle m_ParMainSmoke;
  4. int particle_id;
  5. void SmokeSimulation()
  6. {
  7. particle_id = ParticleList.GRENADE_M18_PURPLE_LOOP;
  8. }
  9. void OnFire( Entity flare)
  10. {
  11. m_ParMainSmoke = ParticleManager.GetInstance().PlayOnObject( particle_id, flare);
  12. m_ParMainSmoke.SetWiggle( 7, 0.3);
  13. }
  14. void ~SmokeSimulation()
  15. {
  16. if (m_ParMainSmoke)
  17. m_ParMainSmoke.Stop();
  18. }
  19. }
  20. class SmokeSimulation_Black : SmokeSimulation
  21. {
  22. void SmokeSimulation_Black()
  23. {
  24. particle_id = ParticleList.GRENADE_M18_BLACK_LOOP;
  25. }
  26. }
  27. class SmokeSimulation_White : SmokeSimulation
  28. {
  29. void SmokeSimulation_White()
  30. {
  31. particle_id = ParticleList.GRENADE_M18_WHITE_LOOP;
  32. }
  33. }
  34. class SmokeSimulation_Red : SmokeSimulation
  35. {
  36. void SmokeSimulation_Red()
  37. {
  38. particle_id = ParticleList.GRENADE_M18_RED_LOOP;
  39. }
  40. }
  41. class SmokeSimulation_Green : SmokeSimulation
  42. {
  43. void SmokeSimulation_Green()
  44. {
  45. particle_id = ParticleList.GRENADE_M18_GREEN_LOOP;
  46. }
  47. }