DestructionSettings.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace DamageNumbersPro
  5. {
  6. [System.Serializable]
  7. public struct DestructionSettings
  8. {
  9. public DestructionSettings(float customDefault)
  10. {
  11. maxDistance = 2f;
  12. spawnDelay = 0.2f;
  13. duration = 0.3f;
  14. scaleCurve = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 0.5f));
  15. alphaCurve = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 0));
  16. }
  17. [Header("Main:")]
  18. [Tooltip("The maximum distance at which damage numbers will be destroyed.")]
  19. public float maxDistance;
  20. [Tooltip("The delay after spawning that numbers will be destroyed.")]
  21. public float spawnDelay;
  22. [Header("Animation:")]
  23. public float duration;
  24. [Tooltip("The scale over the destruction duration.")]
  25. public AnimationCurve scaleCurve;
  26. [Tooltip("The alpha over the destruction duration.")]
  27. public AnimationCurve alphaCurve;
  28. }
  29. }