示例#1
0
 public override void Exit()
 {
     //IL_0017: Unknown result type (might be due to invalid IL or missing references)
     //IL_001e: Expected O, but got Unknown
     //IL_0050: Unknown result type (might be due to invalid IL or missing references)
     //IL_0071: Unknown result type (might be due to invalid IL or missing references)
     if (windEffect != null)
     {
         EffectManager.ReleaseEffect(windEffect.get_gameObject(), true, false);
     }
     if (spots != null)
     {
         spots.ClearAllSpot();
     }
     if (regionMapRoot != null)
     {
         Object.Destroy(regionMapRoot.get_gameObject());
     }
     if (_camera != null)
     {
         Object.Destroy(_camera.get_gameObject());
     }
     if (null != dungeonOpenEffect)
     {
         Object.Destroy(dungeonOpenEffect);
     }
     base.Exit();
 }
 private static void InitFx(rymFX fx, bool binary)
 {
     //IL_0001: Unknown result type (might be due to invalid IL or missing references)
     if (fx.get_gameObject().get_layer() != 5)
     {
         SceneSettingsManager.ApplyEffect(fx, false);
     }
 }
    private IEnumerator DoStartLogoAnimation(bool tutorial_flag, Action onComplete, Action onLoop)
    {
        logo.root.set_position(Vector3.get_up() * 1000f);
        logo.root.set_rotation(Quaternion.get_identity());
        logo.root.set_localScale(Vector3.get_one());
        logo.camera.get_gameObject().SetActive(true);
        Material faderMat = logo.fader.get_material();
        Material logoMat  = logo.logo.get_material();

        logo.camera.set_depth(-1f);
        logo.dragonRoot.SetActive(false);
        Color dragonPlaneColor = new Color(1f, 1f, 1f, 0f);

        logo.dragonPlane.get_sharedMaterial().SetColor("Color", dragonPlaneColor);
        if (tutorial_flag)
        {
            this.StartCoroutine(DoFadeOut());
            SoundManager.RequestBGM(11, false);
            while (MonoBehaviourSingleton <SoundManager> .I.playingBGMID != 11 || MonoBehaviourSingleton <SoundManager> .I.changingBGM)
            {
                yield return((object)null);
            }
            yield return((object)new WaitForSeconds(2.3f));
        }
        else
        {
            faderMat.SetColor("_Color", new Color(0f, 0f, 0f, 0f));
        }
        effects = (GameObject[])new GameObject[titleEffectPrefab.Length];
        for (int j = 0; j < titleEffectPrefab.Length; j++)
        {
            rymFX effect = ResourceUtility.Realizes(titleEffectPrefab[j], -1).GetComponent <rymFX>();
            effect.Cameras = (Camera[])new Camera[1]
            {
                logo.camera
            };
            effect.get__transform().set_localScale(effect.get__transform().get_localScale() * 10f);
            if (j == 1)
            {
                effect.get__transform().set_position(new Vector3(0.568f, 999.946f, 0.1f));
            }
            else
            {
                effect.get__transform().set_position(logo.eye.get_transform().get_position());
            }
            effects[j] = effect.get_gameObject();
        }
        yield return((object)new WaitForSeconds(1f));

        float timer4 = 0f;

        while (timer4 < 0.17f)
        {
            timer4 += Time.get_deltaTime();
            float s = Mathf.Clamp01(timer4 / 0.17f);
            logo.eye.get_transform().set_localScale(Vector3.get_one() * s * 10f);
            logoMat.SetFloat("_AlphaRate", -1f + timer4 * 2f);
            yield return((object)null);
        }
        logo.dragonRoot.SetActive(true);
        while (timer4 < 1f)
        {
            timer4 += Time.get_deltaTime();
            logoMat.SetFloat("_AlphaRate", -1f + timer4 * 2f);
            dragonPlaneColor.a = timer4;
            logo.dragonPlane.get_sharedMaterial().SetColor("Color", dragonPlaneColor);
            yield return((object)null);
        }
        dragonPlaneColor.a = 1f;
        logo.dragonPlane.get_sharedMaterial().SetColor("Color", dragonPlaneColor);
        timer4 = 0f;
        while (timer4 < 0.5f)
        {
            timer4 += Time.get_deltaTime();
            logoMat.SetFloat("_BlendRate", timer4 * 2f);
            yield return((object)null);
        }
        logo.bg.SetActive(true);
        logo.effect1.SetActive(true);
        timer4 = 0f;
        Material bgMaterial = logo.bgFader.get_material();

        while (timer4 < 0.7f)
        {
            timer4 += Time.get_deltaTime();
            bgMaterial.set_color(new Color(1f, 1f, 1f, 1f - timer4 / 0.7f));
            yield return((object)null);
        }
        if (!tutorial_flag)
        {
            onLoop?.Invoke();
            while (!tutorial_flag)
            {
                yield return((object)null);
            }
        }
        yield return((object)new WaitForSeconds(0.3f));

        if (titleUIPrefab != null)
        {
            Transform title_ui = ResourceUtility.Realizes(titleUIPrefab, MonoBehaviourSingleton <UIManager> .I.uiRootTransform, 5);
            if (title_ui != null)
            {
                Transform t3 = Utility.Find(title_ui, "BTN_START");
                if (t3 != null)
                {
                    t3.GetComponent <Collider>().set_enabled(false);
                }
                t3 = Utility.Find(title_ui, "BTN_ADVANCED_LOGIN");
                if (t3 != null)
                {
                    t3.get_gameObject().SetActive(false);
                }
                t3 = Utility.Find(title_ui, "BTN_CLEARCACHE");
                if (t3 != null)
                {
                    t3.get_gameObject().SetActive(false);
                }
            }
        }
        yield return((object)new WaitForSeconds(6f));

        timer4 = 0f;
        while (timer4 < 0.3f)
        {
            timer4 += Time.get_deltaTime();
            faderMat.SetColor("_Color", new Color(0f, 0f, 0f, timer4 / 0.3f));
            yield return((object)null);
        }
        MonoBehaviourSingleton <InputManager> .I.SetDisable(INPUT_DISABLE_FACTOR.INGAME_TUTORIAL, false);

        for (int i = 0; i < effects.Length; i++)
        {
            EffectManager.ReleaseEffect(effects[i], true, false);
        }
        onComplete?.Invoke();
    }
 private static bool OnQueryDestroyFx(rymFX fx)
 {
     //IL_0010: Unknown result type (might be due to invalid IL or missing references)
     //IL_0016: Expected O, but got Unknown
     if (MonoBehaviourSingleton <EffectManager> .IsValid() && MonoBehaviourSingleton <EffectManager> .I.StockOrDestroy(fx.get_gameObject(), false))
     {
         return(false);
     }
     return(true);
 }
示例#5
0
    private IEnumerator DoExitEvent(RegionMapPortal portal, rymFX effect, float delay = 0f, bool reverse = false, bool findDungeon = false)
    {
        if (effect != null)
        {
            EffectManager.ReleaseEffect(effect.get_gameObject(), true, false);
            effect = null;
        }
        yield return((object)new WaitForSeconds(delay));

        LoadObject loadObj = null;

        if (findDungeon)
        {
            LoadingQueue loadQueue = new LoadingQueue(this);
            FieldMapTable.FieldMapTableData mapData = Singleton <FieldMapTable> .I.GetFieldMapData((uint)portal.toLocation.mapId);

            loadObj = loadQueue.Load(RESOURCE_CATEGORY.WORLDMAP, "RegionMap_" + mapData.childRegionId.ToString("D3"), false);
            if (null != dungeonOpenEffect)
            {
                EffectCtrl eff = dungeonOpenEffect.GetComponent <EffectCtrl>();
                eff.Reset();
                for (int i = 0; i < eff.particles.Length; i++)
                {
                    ParticleSystem particle = eff.particles[i];
                    if (!(null == particle))
                    {
                        Renderer renderer = particle.GetComponent <Renderer>();
                        if (!(null == renderer))
                        {
                            renderer.set_sortingOrder(2);
                        }
                    }
                }
                dungeonOpenEffect.get_gameObject().SetActive(true);
                AudioClip clip_effect = eff.attachedAudioClip;
                if (clip_effect != null)
                {
                    int SE_CONFIG_AREA_LOCATION = eff.attachedAudioSettingID;
                    SoundManager.PlayOneShotUISE(clip_effect, SE_CONFIG_AREA_LOCATION);
                }
                yield return((object)new WaitForSeconds(eff.waitTime));
            }
            if (loadQueue.IsLoading())
            {
                yield return((object)loadQueue.Wait());
            }
        }
        TweenScale.Begin(playerMarker.get_gameObject(), MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.playerMarkerScaleTime, Vector3.get_zero());
        yield return((object)new WaitForSeconds(MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.playerMarkerScaleTime));

        float   timer   = 0f;
        Vector3 target2 = portal.toLocation.get_transform().get_position();

        playerMarker.SetParent(portal.toLocation.get_transform());
        if (reverse)
        {
            target2 = portal.fromLocation.get_transform().get_position();
            playerMarker.SetParent(portal.fromLocation.get_transform());
        }
        playerMarker.set_localPosition(MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.playerMarkerOffset);
        target2 -= _camera.get_transform().get_forward() * MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.eventCameraDistance;
        Vector3 startPos = _camera.get_transform().get_position();

        TweenScale.Begin(playerMarker.get_gameObject(), MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.playerMarkerScaleTime, Vector3.get_one());
        while (timer <= MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.eventCameraMoveTime)
        {
            timer += Time.get_deltaTime();
            _camera.get_transform().set_position(Vector3.Lerp(startPos, target2, timer / MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.eventCameraMoveTime));
            yield return((object)null);
        }
        _camera.get_transform().set_position(target2);
        yield return((object)new WaitForSeconds(MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.eventRemainTime));

        if (findDungeon)
        {
            yield return((object)this.StartCoroutine(DoFindNewDungeonEvent(portal, loadObj)));
        }
        OnQuery_EXIT();
    }
示例#6
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();
                }
            }
        }
    }