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

20 lines
579 B
C#

using System;
using UnityEngine;
namespace ConformalDecals.MaterialProperties {
public class MaterialFloatProperty : MaterialProperty {
[SerializeField] public float value;
public override void ParseNode(ConfigNode node) {
base.ParseNode(node);
value = ParsePropertyFloat(node, "value", true, value);
}
public override void Modify(Material material) {
if (material == null) throw new ArgumentNullException("material cannot be null");
material.SetFloat(_propertyID, value);
}
}
}