mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-06-11 05:54:07 +00:00
20 lines
579 B
C#
20 lines
579 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace ConformalDecals.MaterialProperties {
|
|
public class MaterialColorProperty : MaterialProperty {
|
|
[SerializeField] public Color color;
|
|
|
|
public override void ParseNode(ConfigNode node) {
|
|
base.ParseNode(node);
|
|
|
|
color = ParsePropertyColor(node, "color", true, color);
|
|
}
|
|
|
|
public override void Modify(Material material) {
|
|
if (material == null) throw new ArgumentNullException("material cannot be null");
|
|
|
|
material.SetColor(_propertyID, color);
|
|
}
|
|
}
|
|
} |