KSP-Conformal-Decals/Source/ConformalDecals/MaterialModifiers/MaterialFloatProperty.cs
drewcassidy 7e520f97ca Refactor material parsing and loading
This should hopefully pave the way for usable module switching using B9PS
2020-06-02 00:53:17 -07:00

16 lines
449 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 override void Modify(Material material) {
material.SetFloat(_propertyID, _value);
}
}
}