24 lines
570 B
C#
24 lines
570 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace Module.Inspector
|
|
{
|
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
|
public sealed class MinValue : ValueModifierPropertyAttribute
|
|
{
|
|
public readonly int intValue;
|
|
public readonly float floatValue;
|
|
|
|
public MinValue(int value)
|
|
{
|
|
intValue = value;
|
|
floatValue = value;
|
|
}
|
|
|
|
public MinValue(float value)
|
|
{
|
|
intValue = Mathf.RoundToInt(value);
|
|
floatValue = value;
|
|
}
|
|
}
|
|
} |