2025-10-24 11:38:51 +00:00
|
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System;
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
|
2026-05-22 12:25:02 +00:00
|
|
|
using Rokojori.Extensions;
|
2025-10-24 11:38:51 +00:00
|
|
|
namespace Rokojori
|
|
|
|
|
{
|
|
|
|
|
public class AssignedShaderProperty
|
|
|
|
|
{
|
|
|
|
|
public ShaderProperty property;
|
|
|
|
|
public Variant value;
|
|
|
|
|
|
|
|
|
|
public static AssignedShaderProperty From( ShaderProperty sp )
|
|
|
|
|
{
|
|
|
|
|
var asp = new AssignedShaderProperty();
|
|
|
|
|
asp.property = sp;
|
|
|
|
|
return asp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Update()
|
|
|
|
|
{
|
|
|
|
|
if ( (object)value == (object)property.GetValue() )
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
property.ApplyGlobal();
|
|
|
|
|
value = property.GetValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|