Files
Continentis/Assets/OtherPlugins/DamageNumbersPro/Scripts/Settings/DestructionSettings.cs

33 lines
991 B
C#
Raw Normal View History

2026-03-20 11:56:50 -04:00
using System;
2025-10-03 00:02:43 -04:00
using UnityEngine;
namespace DamageNumbersPro
{
2026-03-20 11:56:50 -04:00
[Serializable]
2025-10-03 00:02:43 -04:00
public struct DestructionSettings
{
public DestructionSettings(float customDefault)
{
maxDistance = 2f;
spawnDelay = 0.2f;
duration = 0.3f;
scaleCurve = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 0.5f));
alphaCurve = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 0));
}
2026-03-20 11:56:50 -04:00
[Header("Main:")] [Tooltip("The maximum distance at which damage numbers will be destroyed.")]
2025-10-03 00:02:43 -04:00
public float maxDistance;
2026-03-20 11:56:50 -04:00
2025-10-03 00:02:43 -04:00
[Tooltip("The delay after spawning that numbers will be destroyed.")]
public float spawnDelay;
2026-03-20 11:56:50 -04:00
[Header("Animation:")] public float duration;
2025-10-03 00:02:43 -04:00
[Tooltip("The scale over the destruction duration.")]
public AnimationCurve scaleCurve;
2026-03-20 11:56:50 -04:00
2025-10-03 00:02:43 -04:00
[Tooltip("The alpha over the destruction duration.")]
public AnimationCurve alphaCurve;
}
2026-03-20 11:56:50 -04:00
}