protected void RemoveChild(NodeContent content, NodeModifier node) { if (content.RemoveContenNode(node)) { node.ForceStop(); } NodeModifier[] nodes = node.NextNodes; for (int i = 0; i < nodes.Length; i++) { if (nodes[i].Parent != node) { continue; } RemoveChild(content, nodes[i]); } }
protected override EnumResult OnProcessing(NodeContent content, NodeModifier[] nextNode) { switch (Mode) { case KillMode.Node: for (int i = 0; i < nextNode.Length; i++) { if (nextNode[i].Parent != this) content.RemoveContenNode(nextNode[i]); } break; case KillMode.NodeAndChild: for (int i = 0; i < nextNode.Length; i++) { if (nextNode[i].Parent != this) { RemoveChild(content, nextNode[i]); } } break; } return EnumResult.Success; }
protected virtual EnumResult OnProcessing(NodeContent content, NodeModifier[] nextNode) { return EnumResult.Success; }
public override EnumResult Tick(NodeContent content) { return OnProcessing(content, NextNodes); }
public override EnumResult Tick(NodeContent content) { return Tick(); }
public static void SetContent(NodeModifier node, NodeContent content) { node.RemoveFromContent(); node.DeleteParent(); node.SetContent(content); }
public virtual EnumResult Tick(NodeContent content) { return EnumResult.Success; }
/// <summary> /// 设置父容器 /// </summary> /// <param name="content"></param> public void SetContent(NodeContent content) { if (content == null) return; _content = content; content.AddContentNode(this); }
/// <summary> /// 从父容器中删除自己 /// </summary> public void RemoveFromContent() { if (_content != null) { _content.RemoveContenNode(this); _content = null; } }
public virtual EnumResult Tick(NodeContent content) { return(EnumResult.Success); }
protected void RemoveChild(NodeContent content, NodeModifier node) { if (content.RemoveContenNode(node)) node.ForceStop(); NodeModifier[] nodes = node.NextNodes; for (int i = 0; i < nodes.Length; i++) { if (nodes[i].Parent != node) continue; RemoveChild(content, nodes[i]); } }
public override EnumResult Tick(NodeContent content) { return(Tick()); }
protected virtual EnumResult OnProcessing(NodeContent content, NodeModifier[] nextNode) { return(EnumResult.Success); }
public override EnumResult Tick(NodeContent content) { return(OnProcessing(content, NextNodes)); }
public override sealed EnumResult Tick(NodeContent content) { if (OnCheck()) return EnumResult.Success; return EnumResult.Failed; }