MinMax.cs 525 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. namespace Leap.Unity.Attributes
  3. {
  4. public class MinMax : CombinablePropertyAttribute, IFullPropertyDrawer
  5. {
  6. public MinMax(float min, float max)
  7. {
  8. this.min = min;
  9. this.max = max;
  10. this.isInt = false;
  11. }
  12. public MinMax(int min, int max)
  13. {
  14. this.min = (float)min;
  15. this.max = (float)max;
  16. this.isInt = true;
  17. }
  18. public const float PERCENT_NUM = 0.2f;
  19. public const float SPACING = 3f;
  20. public readonly float min;
  21. public readonly float max;
  22. public readonly bool isInt;
  23. }
  24. }