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/MaterialProperties/MaterialFloatProperty.cs

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);
}
}
}