public void RemoveNode(CLUI_Node node) { if (node.parent != this) { return; } node.SetParent(this); _subnodes.Remove(node); }
public void AddNode(CLUI_Node node) { if (node.parent == this) { return; } if (node.parent != null) { node.parent.RemoveNode(node); } node.SetParent(this); if (_subnodes == null) { _subnodes = new List <CLUI_Node>(); } _subnodes.Add(node); }
void SetParent(CLUI_Node node) { this.parent = node; }
public void RemoveNode(CLUI_Node node) { if (node.parent != this) return; node.SetParent(this); _subnodes.Remove(node); }
public void AddNode(CLUI_Node node) { if (node.parent == this) return; if (node.parent != null) { node.parent.RemoveNode(node); } node.SetParent(this); if (_subnodes == null) _subnodes = new List<CLUI_Node>(); _subnodes.Add(node); }
// Use this for initialization void Start() { var _skin = Resources.Load("GUI/GUISkin001_100percent/GUISkin001") as GUISkin; SetSkin(_skin); nodeUIRoot = new CLUI_Node_Empty ("root"); nodeUIRoot.rectScale = CLUI_Border.ScaleFill; this.ChangeState(new state_0Starter()); }