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.
KSP-Conformal-Decals/Source/ConformalDecals/MaterialModifiers/MaterialColorProperty.cs

20 lines
566 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 MaterialColorProperty(string name, Color value) : base(name) {
_color = value;
}
public override void Modify(Material material) {
material.SetColor(_propertyID, _color);
}
}
}