mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 09:16:01 +08:00
Moved example files around
This commit is contained in:
parent
4d9f74cf5a
commit
3e54f60188
@ -3,6 +3,6 @@ using System.Collections.Generic;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System;
|
using System;
|
||||||
/// <summary> Defines an example nodegraph. </summary>
|
/// <summary> Defines an example nodegraph. </summary>
|
||||||
[Serializable, CreateAssetMenu(fileName = "NodeGraphExample", menuName = "Node Graph/Example")]
|
[Serializable, CreateAssetMenu(fileName = "ExampleNodeGraph", menuName = "Node Graph/Example")]
|
||||||
public class NodeGraphExample : NodeGraph {
|
public class ExampleNodeGraph : NodeGraph {
|
||||||
}
|
}
|
||||||
@ -1,15 +1,15 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public class BaseNode : Node {
|
public class BaseNode : Node {
|
||||||
|
|
||||||
[Input] public string input;
|
[Input] public string input;
|
||||||
[Output] public string output;
|
[Output] public string output;
|
||||||
public bool concat;
|
public bool concat;
|
||||||
[TextArea]
|
[TextArea]
|
||||||
public string SomeString;
|
public string SomeString;
|
||||||
[Header("New stuff")]
|
[Header("New stuff")]
|
||||||
public Color col;
|
public Color col;
|
||||||
public AnimationCurve anim;
|
public AnimationCurve anim;
|
||||||
public Vector3 vec;
|
public Vector3 vec;
|
||||||
}
|
}
|
||||||
@ -1,10 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[CustomNodeEditor(typeof(MathNode), "Math")]
|
[CustomNodeEditor(typeof(MathNode), "Math")]
|
||||||
public class AddNodeEditor : NodeEditor {
|
public class AddNodeEditor : NodeEditor {
|
||||||
|
|
||||||
public override void OnNodeGUI(out Dictionary<NodePort, Vector2> portPositions) {
|
public override void OnNodeGUI(out Dictionary<NodePort, Vector2> portPositions) {
|
||||||
base.OnNodeGUI(out portPositions);
|
base.OnNodeGUI(out portPositions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,18 +1,18 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public class MathNode : Node {
|
public class MathNode : Node {
|
||||||
[Input] public float a;
|
[Input] public float a;
|
||||||
[Input] public float b;
|
[Input] public float b;
|
||||||
[Output] public float result;
|
[Output] public float result;
|
||||||
public enum MathType { Add, Subtract, Multiply, Divide}
|
public enum MathType { Add, Subtract, Multiply, Divide}
|
||||||
public MathType mathType = MathType.Add;
|
public MathType mathType = MathType.Add;
|
||||||
|
|
||||||
protected override void Init() {
|
protected override void Init() {
|
||||||
name = "Math";
|
name = "Math";
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnCreateConnection(NodePort from, NodePort to) {
|
public override void OnCreateConnection(NodePort from, NodePort to) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,9 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 52f863b8b4fc21f47b2af1dd63a719ff
|
|
||||||
folderAsset: yes
|
|
||||||
timeCreated: 1506460802
|
|
||||||
licenseType: Free
|
|
||||||
DefaultImporter:
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Binary file not shown.
@ -1,9 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: ce9064d2750a8344784c005788637f15
|
|
||||||
timeCreated: 1507333474
|
|
||||||
licenseType: Free
|
|
||||||
NativeFormatImporter:
|
|
||||||
mainObjectFileID: 11400000
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Loading…
x
Reference in New Issue
Block a user