You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
566 B
C#
20 lines
566 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace ConformalDecals.MaterialModifiers {
|
|
public class MaterialFloatProperty : MaterialProperty {
|
|
private readonly float _value;
|
|
|
|
public MaterialFloatProperty(ConfigNode node) : base(node) {
|
|
_value = ParsePropertyFloat(node, "value", false);
|
|
}
|
|
|
|
public MaterialFloatProperty(string name, float value) : base(name) {
|
|
_value = value;
|
|
}
|
|
|
|
public override void Modify(Material material) {
|
|
material.SetFloat(_propertyID, _value);
|
|
}
|
|
}
|
|
} |