37 lines
637 B
C#
37 lines
637 B
C#
|
|
using System.Diagnostics;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System;
|
|
using Godot;
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
} |