1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-22 18:26:14 +08:00
xNode/Examples/Nodes/MathNode.cs
Unknown 59085db16a Streamlined creation of custom node ports
Instead of initializing port arrays in Init();, ports are now defined by attributes on public fields
2017-09-24 21:54:53 +02:00

13 lines
376 B
C#

using UnityEngine;
[System.Serializable]
public class MathNode : Node {
[Input] public float a;
[Input] public float b;
[Output] public float result;
public enum ValueType { Float, Int }
public enum MathType { Add, Subtract, Multiply, Divide}
public ValueType valueType = ValueType.Float;
public MathType mathType = MathType.Add;
}