Range.cs 755 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace BansheeEngine
  3. {
  4. /// <summary>
  5. /// Makes an integer or a floating point field be displayed as a slider with a specified range in the inspector.
  6. /// </summary>
  7. [AttributeUsage(AttributeTargets.Field)]
  8. public sealed class Range : Attribute
  9. {
  10. /// <summary>
  11. /// Creates a new range attribute.
  12. /// </summary>
  13. /// <param name="min">Minimum boundary of the range to clamp the field value to.</param>
  14. /// <param name="max">Maximum boundary of the range to clamp the field value to.</param>
  15. public Range(float min, float max)
  16. {
  17. this.min = min;
  18. this.max = max;
  19. }
  20. private float min;
  21. private float max;
  22. }
  23. }