VelocitySettings.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace DamageNumbersPro
  5. {
  6. [System.Serializable]
  7. public struct VelocitySettings
  8. {
  9. public VelocitySettings(float customDefault)
  10. {
  11. minX = -1f;
  12. maxX = 1f;
  13. minY = 4f;
  14. maxY = 5f;
  15. randomFlip = false;
  16. dragX = 0.1f;
  17. dragY = 1f;
  18. gravity = 3f;
  19. }
  20. [Header("Velocity:")]
  21. [Tooltip("Minimum of horizontal velocity.")]
  22. public float minX;
  23. [Tooltip("Maximum of horizontal velocity.")]
  24. public float maxX;
  25. [Tooltip("Minimum of vertical velocity.")]
  26. public float minY;
  27. [Tooltip("Maximum of vertical velocity.")]
  28. public float maxY;
  29. [Header("Horizontal Flip:")]
  30. [Tooltip("Randomly flips the X Velocity.\nUseful for avoiding small movements.\nSet Min X and Max X to a positive value.")]
  31. public bool randomFlip;
  32. [Header("Drag:")]
  33. [Tooltip("Reduces horizontal velocity over time.")]
  34. public float dragX;
  35. [Tooltip("Reduces vertical velocity over time.")]
  36. public float dragY;
  37. [Header("Gravity:")]
  38. [Tooltip("Increases vertical velocity downwards.")]
  39. public float gravity;
  40. }
  41. }