ParticleBurst.generated.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Particles
  7. * @{
  8. */
  9. /// <summary>Specifies a burst of particles that occurs at a certain time point.</summary>
  10. [StructLayout(LayoutKind.Sequential), SerializeObject]
  11. public partial struct ParticleBurst
  12. {
  13. /// <summary>Initializes the struct with default values.</summary>
  14. public static ParticleBurst Default()
  15. {
  16. ParticleBurst value = new ParticleBurst();
  17. value.time = 0f;
  18. value.count = new FloatDistribution(0f);
  19. value.cycles = 1;
  20. value.interval = 1f;
  21. return value;
  22. }
  23. public ParticleBurst(float time, FloatDistribution count, uint cycles = 1, float interval = 1f)
  24. {
  25. this.time = time;
  26. this.count = count;
  27. this.cycles = cycles;
  28. this.interval = interval;
  29. }
  30. /// <summary>Time at which to trigger the burst, in seconds.</summary>
  31. public float time;
  32. /// <summary>Number of particles to emit when the burst triggers.</summary>
  33. public FloatDistribution count;
  34. /// <summary>
  35. /// Determines how many times to trigger the burst. If 0 the burst will trigger infinitely. Use <see cref="interval"/> to
  36. /// to control the time between each cycle.
  37. /// </summary>
  38. public uint cycles;
  39. /// <summary>Controls how much time needs to pass before triggering another burst cycle, in seconds.</summary>
  40. public float interval;
  41. }
  42. /** @} */
  43. }