rj-action-library/Runtime/Shading/Properties/FloatPropertyName.cs

28 lines
538 B
C#
Raw Normal View History

2024-09-14 06:41:52 +00:00
using Godot;
using System.Reflection;
using System.Collections.Generic;
namespace Rokojori
{
[Tool]
[GlobalClass]
2025-01-03 12:09:23 +00:00
public partial class FloatPropertyName : ShaderPropertyName
2024-09-14 06:41:52 +00:00
{
public void Set( Material material, float value )
{
2025-01-03 12:09:23 +00:00
_Set( material, value );
2024-09-14 06:41:52 +00:00
}
public float Get( Material material )
{
2025-01-03 12:09:23 +00:00
return _Get( material, 0f );
}
2024-09-14 06:41:52 +00:00
2025-01-03 12:09:23 +00:00
public static FloatPropertyName Create( string name )
{
var fp = new FloatPropertyName();
fp.propertyName = name;
return fp;
2024-09-14 06:41:52 +00:00
}
}
}