mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
21 lines
598 B
C#
21 lines
598 B
C#
using System;
|
|
using ConformalDecals.Util;
|
|
using UnityEngine;
|
|
|
|
namespace ConformalDecals.MaterialProperties {
|
|
public class MaterialFloatProperty : MaterialProperty {
|
|
[SerializeField] public float value;
|
|
|
|
public override void ParseNode(ConfigNode node) {
|
|
base.ParseNode(node);
|
|
|
|
ParseUtil.ParseFloatIndirect(ref value, node, "value");
|
|
}
|
|
|
|
public override void Modify(Material material) {
|
|
if (material == null) throw new ArgumentNullException(nameof(material));
|
|
|
|
material.SetFloat(_propertyID, value);
|
|
}
|
|
}
|
|
} |