using System;
using System.Runtime.InteropServices;
namespace Rive
{
///
/// A view model instance property that holds a number.
///
public sealed class ViewModelInstanceNumberProperty : ViewModelInstancePrimitiveProperty
{
internal ViewModelInstanceNumberProperty(IntPtr instanceValuePtr, ViewModelInstance rootInstance) : base(instanceValuePtr, rootInstance)
{
}
///
/// The value of the property.
///
public override float Value
{
get
{
ThrowIfOwnerDisposed();
return getViewModelInstanceNumberValue(InstancePropertyPtr);
}
set
{
ThrowIfOwnerDisposed();
setViewModelInstanceNumberValue(InstancePropertyPtr, value);
}
}
[DllImport(NativeLibrary.name)]
private static extern float getViewModelInstanceNumberValue(IntPtr instanceProperty);
[DllImport(NativeLibrary.name)]
private static extern void setViewModelInstanceNumberValue(IntPtr instanceProperty, float value);
}
}