mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Consolidate config parsing and parse layer value
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using ConformalDecals.Util;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ConformalDecals.MaterialProperties {
|
||||
@ -8,11 +9,11 @@ namespace ConformalDecals.MaterialProperties {
|
||||
public override void ParseNode(ConfigNode node) {
|
||||
base.ParseNode(node);
|
||||
|
||||
value = ParsePropertyFloat(node, "value", true, value);
|
||||
ParseUtil.ParseFloatIndirect(ref value, node, "value");
|
||||
}
|
||||
|
||||
public override void Modify(Material material) {
|
||||
if (material == null) throw new ArgumentNullException("material cannot be null");
|
||||
if (material == null) throw new ArgumentNullException(nameof(material));
|
||||
|
||||
material.SetFloat(_propertyID, value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user