예제 #1
0
 public void InitRegionInfo()
 {
     //IL_0036: Unknown result type (might be due to invalid IL or missing references)
     //IL_003b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0060: Unknown result type (might be due to invalid IL or missing references)
     //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
     //IL_0110: Unknown result type (might be due to invalid IL or missing references)
     //IL_0127: Unknown result type (might be due to invalid IL or missing references)
     //IL_0153: Unknown result type (might be due to invalid IL or missing references)
     //IL_0158: Expected O, but got Unknown
     //IL_0164: Unknown result type (might be due to invalid IL or missing references)
     //IL_01a1: Unknown result type (might be due to invalid IL or missing references)
     //IL_01b7: Unknown result type (might be due to invalid IL or missing references)
     if (spots != null)
     {
         Transform val = spots.SetRoot(base._transform);
         if (uiMapSprite == null)
         {
             uiMapSprite = val.FindChild("Map").get_gameObject().GetComponent <UITexture>();
         }
         InitMapSprite(MonoBehaviourSingleton <ScreenOrientationManager> .I.isPortrait);
         worldMapObject.get_gameObject().SetActive(true);
         for (int i = 0; i < openedRegionInfo.Length; i++)
         {
             RegionTable.Data data = openedRegionInfo[i].data;
             if (data != null)
             {
                 SpotManager.Spot spot = spots.AddSpot((int)data.regionId, data.regionName, data.iconPos, SpotManager.ICON_TYPE.CLEARED, "OPEN_REGION", false, false, false, null, null, false, SpotManager.HAPPEN_CONDITION.NONE, 0);
                 spot.SetIconSprite("SPR_ICON", openedRegionInfo[i].icon.loadedObject as Texture2D, (int)data.iconSize.x, (int)data.iconSize.y);
                 if (fromRegionID == data.regionId)
                 {
                     playerMarker.get_gameObject().SetActive(true);
                     playerMarker.SetParent(worldMapObject.get_transform());
                     PlayerMarker component = playerMarker.GetComponent <PlayerMarker>();
                     component.SetWorldMode(true);
                     component.SetCamera(worldMapCamera._camera.get_transform());
                     playerMarker.set_localPosition(data.markerPos);
                 }
                 if (toRegionID == data.regionId)
                 {
                     targetRegionIcon = spot._transform;
                     if (!eventData.IsOnlyCameraMoveEvent())
                     {
                         spot._transform.get_gameObject().SetActive(false);
                     }
                     else
                     {
                         spot._transform.get_gameObject().SetActive(true);
                     }
                 }
             }
         }
     }
 }
예제 #2
0
    private IEnumerator DoInitialize()
    {
        eventData = (SectionEventData)GameSection.GetEventData();
        if (MonoBehaviourSingleton <InGameManager> .IsValid())
        {
            portalData = Singleton <FieldMapTable> .I.GetPortalData(MonoBehaviourSingleton <InGameManager> .I.beforePortalID);
        }
        if (MonoBehaviourSingleton <OutGameSettingsManager> .IsValid() && portalData == null)
        {
            portalData = Singleton <FieldMapTable> .I.GetPortalData((uint)MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.linkFieldPortalID);
        }
        if (eventData.IsQuestToField())
        {
            portalData = Singleton <FieldMapTable> .I.GetPortalData(MonoBehaviourSingleton <FieldManager> .I.currentPortalID);
        }
        if (portalData == null)
        {
            base.Initialize();
        }
        else
        {
            FieldMapTable.FieldMapTableData currentMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalData.srcMapID);

            newMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalData.dstMapID);

            regionId = newMapData.regionId;
            if (NeedDirectionOpenRegion())
            {
                toRegionRelease = true;
                base.Initialize();
            }
            else
            {
                if (currentMapData != null && newMapData != null && newMapData.regionId != currentMapData.regionId)
                {
                    regionId = currentMapData.regionId;
                }
                if (newMapData == null || !IsValidRegion(newMapData))
                {
                    newMapData = null;
                    base.Initialize();
                }
                else
                {
                    LoadingQueue loadQueue          = new LoadingQueue(this);
                    LoadObject   loadedEventUIRoot  = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "NewFieldOpenEventUIRoot", false);
                    LoadObject   loadedLocationSpot = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "LocationSpot", false);
                    LoadObject   loadedEventCamera  = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "NewFieldEventCamera", false);
                    LoadObject   loadedFilterCamera = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "ZoomBlurFilterCamera", false);
                    LoadObject   loadedPlayerMarker = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "PlayerMarker", false);
                    LoadObject   loadedRegion       = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "RegionMap_" + regionId.ToString("D3"), false);
                    LoadObject   loadedEffect       = loadQueue.LoadEffect(RESOURCE_CATEGORY.EFFECT_UI, "ef_ui_map_fire_01", false);
                    LoadObject   loadedWindEffect   = loadQueue.LoadEffect(RESOURCE_CATEGORY.EFFECT_ACTION, "ef_btl_bg_questmap_01", false);
                    LoadObject   loadedDungeonEff   = null;
                    if (eventData.IsFindNewDungeon() && newMapData != null)
                    {
                        uint mapID = newMapData.mapID;
                        loadedDungeonEff = loadQueue.LoadEffect(RESOURCE_CATEGORY.EFFECT_DUNGEON, "DEF_" + mapID.ToString("D8"), false);
                    }
                    LoadObject loadedEncounterBossCutIn = null;
                    if (eventData.IsEncounterBossEvent())
                    {
                        loadedEncounterBossCutIn = loadQueue.Load(RESOURCE_CATEGORY.UI, "InGameFieldQuestWarning", false);
                    }
                    CacheAudio(loadQueue);
                    if (loadQueue.IsLoading())
                    {
                        yield return((object)loadQueue.Wait());
                    }
                    if (loadedEncounterBossCutIn != null)
                    {
                        fieldQuestWarningRoot = ResourceUtility.Realizes(loadedEncounterBossCutIn.loadedObject, -1).get_gameObject();
                        UIPanel panel = fieldQuestWarningRoot.GetComponentInChildren <UIPanel>();
                        if (panel != null)
                        {
                            panel.depth = 8000;
                        }
                        if (MonoBehaviourSingleton <UIInGameFieldQuestWarning> .IsValid())
                        {
                            MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.Load(loadQueue);
                        }
                    }
                    if (loadQueue.IsLoading())
                    {
                        yield return((object)loadQueue.Wait());
                    }
                    topEffectPrefab = loadedEffect.loadedObject;
                    Transform t = ResourceUtility.Realizes(loadedEventUIRoot.loadedObject, base._transform, -1);
                    regionMapRoot = ResourceUtility.Realizes(loadedRegion.loadedObject, MonoBehaviourSingleton <AppMain> .I._transform, -1).get_gameObject().GetComponent <RegionMapRoot>();
                    if (regionMapRoot != null)
                    {
                        bool wait = true;
                        regionMapRoot.InitPortalStatus(delegate
                        {
                            ((_003CDoInitialize_003Ec__Iterator164) /*Error near IL_0526: stateMachine*/)._003Cwait_003E__15 = false;
                        });
                        while (wait)
                        {
                            yield return((object)null);
                        }
                    }
                    blurFilter = (ResourceUtility.Instantiate <Object>(loadedFilterCamera.loadedObject) as GameObject).GetComponent <ZoomBlurFilter>();
                    blurFilter.get_transform().set_parent(base._transform);
                    _camera          = ResourceUtility.Realizes(loadedEventCamera.loadedObject, MonoBehaviourSingleton <AppMain> .I._transform, -1).GetComponent <Camera>();
                    uiFrontMapSprite = t.FindChild("FrontMap").get_gameObject().GetComponent <UITexture>();
                    if (uiFrontMapSprite != null)
                    {
                        uiFrontMapSprite.alpha = 0f;
                    }
                    uiMapSprite = t.FindChild("Map").get_gameObject().GetComponent <UITexture>();
                    InitMapSprite(MonoBehaviourSingleton <ScreenOrientationManager> .I.isPortrait);
                    if (eventData.IsEncounterBossEvent())
                    {
                        t.FindChild("TaptoSkip").get_gameObject().SetActive(false);
                    }
                    bgEventListener = UIEventListener.Get(t.Find("BG").get_gameObject());
                    tutorialTrigger = t.FindChild("TUTORIAL_TRIGGER");
                    if (tutorialTrigger != null)
                    {
                        if (!TutorialStep.HasAllTutorialCompleted())
                        {
                            tutorialTrigger.get_gameObject().SetActive(true);
                            UITweenCtrl.Play(tutorialTrigger, true, null, false, 0);
                        }
                        else
                        {
                            tutorialTrigger.get_gameObject().SetActive(false);
                        }
                    }
                    spots = new SpotManager(null, loadedLocationSpot.loadedObject as GameObject, _camera);
                    spots.spotRootTransform = t;
                    playerMarker            = ResourceUtility.Realizes(loadedPlayerMarker.loadedObject, -1);
                    PlayerMarker playerMarkerCom = playerMarker.GetComponent <PlayerMarker>();
                    if (null != playerMarkerCom)
                    {
                        playerMarkerCom.SetCamera(_camera.get_transform());
                    }
                    windEffect         = ResourceUtility.Realizes(loadedWindEffect.loadedObject, _camera.get_transform(), -1).get_gameObject().GetComponent <rymFX>();
                    windEffect.Cameras = (Camera[])new Camera[1]
                    {
                        _camera
                    };
                    windEffect.get_gameObject().set_layer(LayerMask.NameToLayer("WorldMap"));
                    if (loadedDungeonEff != null)
                    {
                        dungeonOpenEffect = ResourceUtility.Realizes(loadedDungeonEff.loadedObject, base._transform, -1);
                        dungeonOpenEffect.get_gameObject().SetActive(false);
                    }
                    CreateVisitedLocationSpot();
                    if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() == "InGameScene")
                    {
                        MonoBehaviourSingleton <ScreenOrientationManager> .I.OnScreenRotate += InitMapSprite;
                    }
                    base.Initialize();
                }
            }
        }
    }