1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-21 01:36:03 +08:00
xNode/Example/Nodes/Vector.cs
Thor Brigsted c6a4735c71 Renamed to xNode
Added XNode and XNodeEDitor namespaces
Removed unnecessary usings
2017-11-05 23:42:31 +01:00

16 lines
457 B
C#

using UnityEngine;
using XNode;
namespace BasicNodes {
public class Vector : Node {
[Input] public float x, y, z;
[Output] public Vector3 vector;
public override object GetValue(NodePort port) {
float x = GetInputValue<float>("x", this.x);
float y = GetInputValue<float>("y", this.y);
float z = GetInputValue<float>("z", this.z);
return new Vector3(x, y, z);
}
}
}