using UnityEngine; namespace EditorAttributes { /// /// Attribute to wrap over a numeric value after it surpases it's limits /// public class WrapAttribute : PropertyAttribute { public float MinValueX { get; private set; } public float MaxValueX { get; private set; } public float MinValueY { get; private set; } public float MaxValueY { get; private set; } public float MinValueZ { get; private set; } public float MaxValueZ { get; private set; } public float MinValueW { get; private set; } public float MaxValueW { get; private set; } /// /// Attribute to wrap over a numeric value after it surpases it's limits /// /// The min value before it wraps arround /// The max value before it wraps arround public WrapAttribute(float minValue, float maxValue) { MinValueX = minValue; MaxValueX = maxValue; MinValueY = minValue; MaxValueY = maxValue; MinValueZ = minValue; MaxValueZ = maxValue; MinValueW = minValue; MaxValueW = maxValue; } /// /// Attribute to wrap over a numeric value after it surpases it's limits /// /// The min value on X before it wraps arround /// The max value on X before it wraps arround /// The min value on Y before it wraps arround /// The max value on Y before it wraps arround public WrapAttribute(float minValueX, float maxValueX, float minValueY, float maxValueY) { MinValueX = minValueX; MaxValueX = maxValueX; MinValueY = minValueY; MaxValueY = maxValueY; MinValueZ = minValueX; MaxValueZ = maxValueX; MinValueW = minValueY; MaxValueW = maxValueY; } /// /// Attribute to wrap over a numeric value after it surpases it's limits /// /// The min value on X before it wraps arround /// The max value on X before it wraps arround /// The min value on Y before it wraps arround /// The max value on Y before it wraps arround /// The min value on Z before it wraps arround /// The max value on Z before it wraps arround public WrapAttribute(float minValueX, float maxValueX, float minValueY, float maxValueY, float minValueZ, float maxValueZ) { MinValueX = minValueX; MaxValueX = maxValueX; MinValueY = minValueY; MaxValueY = maxValueY; MinValueZ = minValueZ; MaxValueZ = maxValueZ; MinValueW = minValueX; MaxValueW = maxValueX; } /// /// Attribute to wrap over a numeric value after it surpases it's limits /// /// The min value on X before it wraps arround /// The max value on X before it wraps arround /// The min value on Y before it wraps arround /// The max value on Y before it wraps arround /// The min value on Z before it wraps arround /// The max value on Z before it wraps arround /// The min value on W before it wraps arround /// The max value on W before it wraps arround public WrapAttribute(float minValueX, float maxValueX, float minValueY, float maxValueY, float minValueZ, float maxValueZ, float minValueW, float maxValueW) { MinValueX = minValueX; MaxValueX = maxValueX; MinValueY = minValueY; MaxValueY = maxValueY; MinValueZ = minValueZ; MaxValueZ = maxValueZ; MinValueW = minValueW; MaxValueW = maxValueW; } } }