private void ReplaceDepNode(DepNode depNode, string tag) { if (depNode == null) { Debug.LogError("BuildingBox.ReplaceDepNode depNode == null "); return; } //Debug.Log("BuildingBox.ReplaceDepNode depNode :"+ depNode+ ",tag:"+ tag); if (roomFactory.Contains(depNode))//避免重复操作 { //Debug.Log("BuildingBox.ReplaceDepNode roomFactory.Contains(depNode) :" + depNode); return; } roomFactory.SetTopoNode(depNode, topoNode, true); if (topoNode != null && topoNode.Children != null) { roomFactory.BindingChild(depNode, topoNode.Children.ToList(), true); } if (mapManager == null) { mapManager = MapLoadManage.Instance; } if (mapManager != null) { mapManager.InitBuildingId(); mapManager.ReplaceDepNode(depNode); } FactoryDepManager.Instance.ReplaceNode(depNode); }
public void ShowBg(DepNode node) { DepNode CurrentNode = node; MapLoadManage Map = MapLoadManage.Instance; if (IsParentFloor(CurrentNode)) { CurrentNode = node.ParentNode; } if (CurrentNode as FactoryDepManager || CurrentNode as DepController || CurrentNode as BuildingController) { if (Map) { Map.DisSelectLast(); } ExpandButton.gameObject.SetActive(false); CloseBg.SetActive(true); NormalBg.SetActive(false); ScaleTreeWindow(true); } else { if (Map && Map.ShowBuildingMap(CurrentNode)) { ExpandButton.gameObject.SetActive(true); //if (IsExpand) ExpandOut(); if (IsExpand) { ExpandOut(); ScaleTreeWindow(false); } } } }
// Use this for initialization void Awake() { Instance = this; //InitBuildingId(); }