vehiclesmoke.c 486 B

123456789101112131415161718192021222324252627282930313233
  1. class EffVehicleSmoke : EffectParticle
  2. {
  3. void EffVehicleSmoke()
  4. {
  5. SetParticleStateLight();
  6. }
  7. void SetParticleStateLight()
  8. {
  9. SetParticleState( ParticleList.HATCHBACK_COOLANT_OVERHEATING );
  10. }
  11. void SetParticleStateHeavy()
  12. {
  13. SetParticleState( ParticleList.HATCHBACK_COOLANT_OVERHEATED );
  14. }
  15. void SetParticleState( int state )
  16. {
  17. bool was_playing = IsPlaying();
  18. Stop();
  19. SetParticleID(state);
  20. if (was_playing)
  21. {
  22. Start(); // resume effect
  23. }
  24. }
  25. }