LerpSettings.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace DamageNumbersPro
  5. {
  6. [System.Serializable]
  7. public struct LerpSettings
  8. {
  9. public LerpSettings (int customDefault)
  10. {
  11. minX = -0.4f;
  12. maxX = 0.4f;
  13. minY = 0.5f;
  14. maxY = 1f;
  15. speed = 5f;
  16. randomFlip = false;
  17. }
  18. [Header("Speed:")]
  19. [Tooltip("Speed at which it moves to the offset position.")]
  20. public float speed;
  21. [Header("Offset:")]
  22. [Tooltip("Minimum of horizontal offset.")]
  23. public float minX;
  24. [Tooltip("Maximum of horizontal offset.")]
  25. public float maxX;
  26. [Tooltip("Minimum of vertical offset.")]
  27. public float minY;
  28. [Tooltip("Maximum of vertical offset.")]
  29. public float maxY;
  30. [Header("Horizontal Flip:")]
  31. [Tooltip("Randomly flips the X Offset.\nUseful for avoiding small movements.\nSet Min X and Max X to a positive value.")]
  32. public bool randomFlip;
  33. }
  34. }