一个用于创建一个数值,其值不能小于 MinValue 或超过 MaxValue 的实例。
概要
属性
Class.DoubleConstrainedValue.Value 属性可以包含的最高数值。
Class.DoubleConstrainedValue.Value 属性可以设置的最低数值。
用于在 DoubleConstrainedValue.MinValue 和 DoubleConstrainedValue.MaxValue 之间保持一个数值。
活动
发射 每当 DoubleConstrainedValue.Value 的 DoubleConstrainedValue 发生变更时。
属性
方法
活动
Changed
发射 每当 DoubleConstrainedValue.Value 的 DoubleConstrainedValue 发生变更时。
参数
代码示例
The below example, assuming all referenced objects existed, would print the DoubleConstrainedValue's new value each time it's changed. In the example below it would print 2, assuming it's within DoubleConstrainedValue's MinValue and MaxValue range. Otherwise there will be no change.
DoubleConstrainedValue.Changed
workspace.DoubleConstrainedValue.Changed:Connect(function(newValue)
print(newValue)
end)
workspace.DoubleConstrainedValue.Value = 2