First commit
This commit is contained in:
30
Sample/Runtime/Nodes/AddNode.cs
Normal file
30
Sample/Runtime/Nodes/AddNode.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
#if UNITY_EDITOR
|
||||
using Misaki.GraphView.Editor;
|
||||
#endif
|
||||
|
||||
namespace Misaki.GraphView.Sample
|
||||
{
|
||||
[NodeInfo("Add", "Math")]
|
||||
public class AddNode : BackTraceBaseNode
|
||||
{
|
||||
[NodeInput]
|
||||
#if UNITY_EDITOR
|
||||
[InspectorInput]
|
||||
#endif
|
||||
public float a;
|
||||
|
||||
[NodeInput]
|
||||
#if UNITY_EDITOR
|
||||
[InspectorInput]
|
||||
#endif
|
||||
public float b;
|
||||
|
||||
[NodeOutput]
|
||||
private float _result;
|
||||
|
||||
protected override void OnExecute()
|
||||
{
|
||||
_result = a + b;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user