mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
19 lines
581 B
C#
19 lines
581 B
C#
using ConformalDecals.Util;
|
|
using UnityEngine;
|
|
|
|
namespace ConformalDecals.MaterialProperties {
|
|
public class MaterialKeywordProperty : MaterialProperty {
|
|
[SerializeField] public bool value = true;
|
|
|
|
public override void ParseNode(ConfigNode node) {
|
|
base.ParseNode(node);
|
|
|
|
ParseUtil.ParseBoolIndirect(ref value, node, "value");
|
|
}
|
|
|
|
public override void Modify(Material material) {
|
|
if (value) material.EnableKeyword(_propertyName);
|
|
else material.DisableKeyword(_propertyName);
|
|
}
|
|
}
|
|
} |