本文整理汇总了C#中NodeBase类的典型用法代码示例。如果您正苦于以下问题:C# NodeBase类的具体用法?C# NodeBase怎么用?C# NodeBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NodeBase类属于命名空间,在下文中一共展示了NodeBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitNodePopup
public static void InitNodePopup(NodeBase node, NodeGraph graph)
{
currentNodePopupWindow = (NodeGraphPopupWindow)EditorWindow.GetWindow<NodeGraphPopupWindow>();
currentNodePopupWindow.node = node;
currentNodePopupWindow.graph = graph;
currentNodePopupWindow.title = "Create a new GraphNode";
}
示例2: getLastRuleNode
private RuleNode getLastRuleNode(NodeBase current)
{
if (!current.HasChild)
{
if (current is RuleNode)
{
return current as RuleNode;
}
else
{
return null;
}
}
else
{
if (current.ChildNode is GroupNode)
{
return getLastRuleNode(((GroupNode)current.ChildNode).GroupRoot);
}
else
{
return getLastRuleNode(current.ChildNode);
}
}
}
示例3: Expand
public override IEnumerable<NodeBase> Expand(Context ctx, NodeBase expression, Label nextStatement)
{
foreach (var rule in KeyRule.Expand(ctx, Expr.GetMember(expression, "Key"), nextStatement))
yield return rule;
foreach (var rule in ValueRule.Expand(ctx, Expr.GetMember(expression, "Value"), nextStatement))
yield return rule;
}
示例4: Connected
public virtual bool Connected(int i, NodeBase target)
{
return
joints.Count != 0 &&
i > 0 &&
i < joints.Count &&
joints[i].TargetId == target.Id;
}
示例5: New2
public static New New2(BlockBase parent, string type, NodeBase length)
{
var ret = new New();
ret.Parent = parent;
ret.type = TypeReference.New(Types.GetType(parent, type), true);
ret.Length = length;
return ret;
}
示例6: NodeJointPoint
public NodeJointPoint(Rect actionRect, Vector2 offset, NodeDrawableBase parent, NodeBase target = null)
{
ActionRect = actionRect;
Offset = offset;
Target = target != null ? target.FirstJoint : null;
TargetId = target != null ? target.Id : NodeDrawableBase.NothingId;
ParentId = parent.Id;
//Debug.Log("in " + parent + ", ID=" + parent.ElementName);
}
示例7: NodeUpdatedEvent
public NodeUpdatedEvent(IAcSession acSession, NodeBase source, INodeUpdateIo output)
: base(acSession, source)
{
if (output == null)
{
throw new System.ArgumentNullException("output");
}
this.Output = output;
}
示例8: Expand
public override IEnumerable<NodeBase> Expand(Context ctx, NodeBase expression, Label nextStatement)
{
yield return Expr.If(
Expr.NotEqual(Literal as NodeBase, expression),
Expr.Block(
Expr.JumpTo(nextStatement)
)
);
}
示例9: NodeCursorEventArgs
public NodeCursorEventArgs(NodeBase source, string command, object tag,
int X, int Y, int ClickCount, GameUI.MouseButtons Button, GameUI.MouseClicks ClickType)
: base(source, command, tag)
{
this.x = X;
this.y = Y;
this.clicks = ClickCount;
this.button = Button;
this.clicktype = ClickType;
}
示例10: FlashNode
public void FlashNode(NodeBase node)
{
if (node == null) return;
this.flashNode = node;
this.flashDuration = 0.0f;
this.timerFlashItem.Enabled = true;
this.folderView.EnsureVisible(this.folderView.FindNode(this.folderModel.GetPath(this.flashNode)));
}
示例11: Expand
public override IEnumerable<NodeBase> Expand(Context ctx, NodeBase expression, Label nextStatement)
{
for (var idx = 0; idx < ElementRules.Count; idx++)
{
var fieldName = string.Format("Item{0}", idx + 1);
var rules = ElementRules[idx].Expand(ctx, Expr.GetMember(expression, fieldName), nextStatement);
foreach (var rule in rules)
yield return rule;
}
}
示例12: ConvertToCall
private Call ConvertToCall(NodeBase v)
{
if (v is Call)
return v as Call;
if (v is Variant)
return Call.NewName(parent, (v as Variant).Name);
if (!(v is Member))
return Call.NewV(parent, v, null, null);
var mem = v as Member;
return Call.New(parent, mem.GetName(), mem.GetTarget(), null);
}
示例13: ReadIndex
private NodeBase ReadIndex(NodeBase target)
{
var t = Read();
if (t == "]" && target is Variant)
return TypeOf.New(parent, Variant.NewName(parent, (target as Variant).Name + "[]"));
else if (t != null)
Rewind();
var ret = Index.New(parent, target, ReadExpression());
Check("配列", "]");
return ret;
}
示例14: Test
public void Test()
{
var tc = new TestClass();
var etc = new List<TestClass>();
var otc = new List<object>();
var nodeBase = new NodeBase(null, null);
nodeBase.Register(otc);
nodeBase.Get<IEnumerable<TestClass>>();
//TODO: this is the case needed by my immediate code
}
示例15: getEndNode
private NodeBase getEndNode(NodeBase current)
{
if (!current.HasChild)
{
return current;
}
else
{
return getEndNode(current.ChildNode);
}
}