/// <summary> /// 获取Area所存放的路径 /// </summary> /// <returns></returns> public string GetAreaScenePath() { if (string.IsNullOrEmpty(m_AreaScenePath)) { m_AreaScenePath = string.Format("{0}/GamingMapArea_{1}_{2}.unity", m_GamingMap.GetOwnerAreaPath(), m_GamingMap.m_Uid, m_AreaId); } return(m_AreaScenePath); }
public IEnumerator OnUpdate(GamingMap map, bool isExport = false) { m_GamingMap = map; m_AreaScenePath = string.Format("{0}/GamingMapArea_{1}_{2}.unity", m_GamingMap.GetOwnerAreaPath(), m_GamingMap.m_Uid, m_AreaId); gameObject.name = string.Format("{0}_{1}", m_AreaName, m_AreaId); if (m_CreatureRoot == null && m_LocationRoot == null && m_TriggerRoot == null && m_TreasureRoot == null && m_MineralRoot == null) { yield return(null); } else { if (m_CreatureRoot != null) { IEnumerator creatureRootEnumerot = m_CreatureRoot.OnUpdate(this); if (creatureRootEnumerot != null) { while (m_CreatureRoot != null && creatureRootEnumerot.MoveNext()) { yield return(null); } } } if (m_LocationRoot != null) { IEnumerator locationRootEnumerot = m_LocationRoot.OnUpdate(this); if (locationRootEnumerot != null) { while (m_LocationRoot != null && m_LocationRoot.gameObject != null && locationRootEnumerot.MoveNext()) { yield return(null); } } } if (m_TeleportRoot != null) { IEnumerator teleportRootEnumerot = m_TeleportRoot.OnUpdate(this); if (teleportRootEnumerot != null) { while (m_TeleportRoot != null && teleportRootEnumerot.MoveNext()) { yield return(null); } } } if (m_LeapRoot != null) { IEnumerator leapRootEnumerot = m_LeapRoot.OnUpdate(this); if (leapRootEnumerot != null) { while (m_LeapRoot != null && leapRootEnumerot.MoveNext()) { yield return(null); } } } if (m_TriggerRoot != null) { IEnumerator triggerRootEnumerot = m_TriggerRoot.OnUpdate(this); if (triggerRootEnumerot != null) { while (m_TriggerRoot != null && m_TriggerRoot.gameObject != null && triggerRootEnumerot != null && triggerRootEnumerot.MoveNext()) { yield return(null); } } } if (m_TreasureRoot != null && m_TreasureRoot.gameObject != null) { IEnumerator treasureRootEnumerot = m_TreasureRoot.OnUpdate(this); if (treasureRootEnumerot != null) { while (m_TreasureRoot != null && m_TreasureRoot.gameObject != null && treasureRootEnumerot != null && treasureRootEnumerot.MoveNext()) { yield return(null); } } } if (m_MineralRoot != null && m_MineralRoot.gameObject != null) { IEnumerator mineralRootEnumerot = m_MineralRoot.OnUpdate(this); if (mineralRootEnumerot != null) { while (m_MineralRoot != null && m_MineralRoot.gameObject != null && mineralRootEnumerot != null && mineralRootEnumerot.MoveNext()) { yield return(null); } } } } if (isExport) { RefreshAreaInfo(); } }