public void SetRedPointNodeCallBack(string strNode, RedPointSystem.OnPointNumChange callBack) { var nodeList = strNode.Split('.');// 分析树节点 if (nodeList.Length == 1) { if (nodeList[0] != RedPointConst.main) { Debug.Log("Get Wrong Root Node! current is " + nodeList[0]); return; } } var node = mRootNode; for (int i = 1; i < nodeList.Length; i++) { if (!node.dicChilds.ContainsKey(nodeList[i])) { Debug.Log("Does Not Contains Child Node :" + nodeList[i]); return; } node = node.dicChilds[nodeList[i]]; if (i == nodeList.Length - 1) // 最后一个节点了 { node.numChangeFunc = callBack; return; } } }