//문세팅 public void DoorSetting(Transform NowMap) { //현제맵에있는 문 딜리게이트에서 제거 if (_NowMap != null) { Transform _NowMapDoor = _NowMap.Find("Door"); if (_NowMapDoor.transform.childCount != 0) { for (int i = 0; i < _NowMapDoor.transform.childCount; ++i) { _DoorOpen -= _NowMapDoor.transform.GetChild(i).GetComponent <cDoor>().Open; _DoorClose -= _NowMapDoor.transform.GetChild(i).GetComponent <cDoor>().Close; } } } //이동한 맵 문 델리게이트 추가 및 문리스트에 추가 Transform Door = NowMap.Find("Door"); _DoorList.Clear(); for (int i = 0; i < Door.transform.childCount; ++i) { _DoorList.Add(Door.transform.GetChild(i).GetComponent <cDoor>()); } for (int i = 0; i < Door.transform.childCount; ++i) { _DoorOpen += Door.transform.GetChild(i).GetComponent <cDoor>().Open; _DoorClose += Door.transform.GetChild(i).GetComponent <cDoor>().Close; } }
//문세팅 public void DoorSetting() { //문 델리게이트 추가 및 문리스트에 추가 Transform Door = transform.Find("Door"); if (Door != null) { _DoorList.Clear(); for (int i = 0; i < Door.transform.childCount; ++i) { _DoorList.Add(Door.transform.GetChild(i).GetComponent <cDoor>()); } for (int i = 0; i < Door.transform.childCount; ++i) { _DoorOpen += Door.transform.GetChild(i).GetComponent <cDoor>().Open; _DoorClose += Door.transform.GetChild(i).GetComponent <cDoor>().Close; } } }