Range.cs 1005 B

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