KSP-Conformal-Decals/Source/ConformalDecals/MaterialModifiers/MaterialColorProperty.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 MaterialColorProperty : MaterialProperty {
private readonly Color _color;
public MaterialColorProperty(ConfigNode node) : base(node) {
_color = ParsePropertyColor(node, "color", false);
}
public override void Modify(Material material) {
material.SetColor(_propertyID, _color);
}
}
}