private void OnQuery_PUSH_START()
    {
        //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
        //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e9: Unknown result type (might be due to invalid IL or missing references)
        //IL_0108: Unknown result type (might be due to invalid IL or missing references)
        if (!(null != tapEffect))
        {
            GameSection.StayEvent();
            MonoBehaviourSingleton <LoungeMatchingManager> .I.SendInfo(delegate(bool is_success)
            {
                GameSection.ResumeEvent(is_success, null);
            }, false);

            tapEffect = ResourceUtility.Realizes(tapPrefab, -1);
            if (null != tapEffect)
            {
                rymFX component = tapEffect.GetComponent <rymFX>();
                if (null != component && null != director)
                {
                    component.Cameras = (Camera[])new Camera[1]
                    {
                        director.logoCamera
                    };
                }
                tapEffect.set_localPosition(new Vector3(0f, 1000f, 0.1f));
                tapEffect.set_localScale(new Vector3(11f, 11f, 1f));
                tapEffect.get_gameObject().SetActive(true);
            }
            SetActive((Enum)UI.BTN_CLEARCACHE, false);
            this.StartCoroutine(DelayStart());
        }
    }
Beispiel #2
0
 private void OnDestroyFx(rymFX fx)
 {
     if (fx.get_name() == "ef_ui_tap_01")
     {
         effectCount--;
     }
 }
 private static void PlaySound(rymFX fx, rymFXSoundInfo info)
 {
     //IL_0018: Unknown result type (might be due to invalid IL or missing references)
     //IL_0074: Unknown result type (might be due to invalid IL or missing references)
     //IL_0079: Expected O, but got Unknown
     if (fx.get_enabled() && (!info.loop || !(info.audio_source != null)) && !string.IsNullOrEmpty(info.clip_name))
     {
         ResourceLink component = fx.GetComponent <ResourceLink>();
         if (component != null)
         {
             string    fileNameWithoutExtension = Path.GetFileNameWithoutExtension(info.clip_name);
             AudioClip val = component.Get <AudioClip>(fileNameWithoutExtension);
             if (val != null)
             {
                 AudioObject audioObject = SoundManager.PlaySE(val, info.loop, fx.get__transform());
                 if (audioObject != null && info.loop)
                 {
                     EffectInfoComponent component2 = fx.GetComponent <EffectInfoComponent>();
                     if (component2 != null)
                     {
                         component2.SetLoopAudioObject(audioObject);
                     }
                 }
             }
             else
             {
                 Log.Error(LOG.RESOURCE, "{0} is not found. ({1})", fileNameWithoutExtension, fx.get_name());
             }
         }
     }
 }
 private void SetEffects(GameObject[] prefabs)
 {
     //IL_005a: Unknown result type (might be due to invalid IL or missing references)
     //IL_0069: Unknown result type (might be due to invalid IL or missing references)
     //IL_006e: Expected O, but got Unknown
     if (prefabs != null && prefabs.Length > 0)
     {
         Camera          val  = (!MonoBehaviourSingleton <AppMain> .IsValid()) ? ((object)useCamera) : ((object)MonoBehaviourSingleton <AppMain> .I.mainCamera);
         List <Animator> list = new List <Animator>();
         effects = (GameObject[])new GameObject[prefabs.Length];
         for (int i = 0; i < prefabs.Length; i++)
         {
             GameObject val2      = ResourceUtility.Realizes(prefabs[i], effectParent, effectParent.get_gameObject().get_layer()).get_gameObject();
             rymFX      component = val2.GetComponent <rymFX>();
             if (component != null)
             {
                 component.Cameras = (Camera[])new Camera[1]
                 {
                     val
                 };
                 val2.GetComponentsInChildren <Animator>(list);
                 animators.AddRange(list);
             }
             val2.SetActive(false);
             effects[i] = val2;
         }
     }
 }
 public override void Skip()
 {
     if (!skip)
     {
         for (int i = 0; i < effects.Length; i++)
         {
             GameObject val = effects[i];
             if (val != null)
             {
                 rymFX component = val.GetComponent <rymFX>();
                 if (component != null)
                 {
                     float num = component.GetEndFrame() - component.GetCurFrame();
                     if (num > 0f)
                     {
                         float num2 = num / 30f;
                         component.UpdateFx(num2, null, component.IsLoop());
                     }
                 }
             }
         }
         if (animators != null && animators.Count > 0)
         {
             for (int j = 0; j < animators.Count; j++)
             {
                 animators[j].set_speed(10000f);
             }
         }
         SoundManager.StopSEAll(0);
         base.Skip();
     }
 }
 private void OnFxDisable(rymFX fx)
 {
     if (skip)
     {
         fx.PlayRate = 1f;
     }
 }
 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 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);
 }
Beispiel #9
0
 public static void ApplyEffect(rymFX fx, bool force)
 {
     //IL_0037: Unknown result type (might be due to invalid IL or missing references)
     //IL_003c: Unknown result type (might be due to invalid IL or missing references)
     //IL_0042: Unknown result type (might be due to invalid IL or missing references)
     //IL_0047: Unknown result type (might be due to invalid IL or missing references)
     //IL_0049: Unknown result type (might be due to invalid IL or missing references)
     //IL_004a: Unknown result type (might be due to invalid IL or missing references)
     if (!(fx == null) && (force || fx.BaseColor.a == 0f))
     {
         Color val = fx.BaseColor = ((!MonoBehaviourSingleton <SceneSettingsManager> .IsValid()) ? Color.get_white() : MonoBehaviourSingleton <SceneSettingsManager> .I.effectColor);
     }
 }
    private Transform CreateEffect(GameObject effect, Transform parent, Camera cam)
    {
        //IL_0003: Unknown result type (might be due to invalid IL or missing references)
        //IL_0031: Unknown result type (might be due to invalid IL or missing references)
        //IL_0036: Expected O, but got Unknown
        Transform val       = ResourceUtility.Realizes(effect, parent, parent.get_gameObject().get_layer());
        rymFX     component = val.GetComponent <rymFX>();

        component.Cameras = (Camera[])new Camera[1]
        {
            cam
        };
        effects.Add(val.get_gameObject());
        return(val);
    }
Beispiel #11
0
    protected Transform PlayEffect(Transform parent, GameObject prefab)
    {
        Transform val = ResourceUtility.Realizes(prefab, parent, -1);

        effects.Add(val);
        rymFX component = val.GetComponent <rymFX>();

        if (component != null)
        {
            component.Cameras = (Camera[])new Camera[1]
            {
                MonoBehaviourSingleton <AppMain> .I.mainCamera
            };
        }
        return(val);
    }
 public override void Skip()
 {
     if (!skip)
     {
         foreach (GameObject effect in effects)
         {
             if (Object.op_Implicit(effect))
             {
                 rymFX component = effect.GetComponent <rymFX>();
                 float num       = component.GetLoopLastFrame() - component.GetCurFrame();
                 component.UpdateFx(num / 30f, null, false);
             }
         }
         base.Skip();
     }
 }
Beispiel #13
0
    private IEnumerator DoOpenNewDungeon()
    {
        yield return((object)null);

        RegionMapPortal portal;
        bool            reverse = IsPortalReverseAndGetPortalData((int)portalData.portalID, out portal);

        if (portal == null)
        {
            RequestEvent("EXIT", null);
        }
        else
        {
            regionMapRoot.animator.Play(portal.get_gameObject().get_name());
            SetCameraToMiddlePoint(portal);
            SetPlayerMakerToStartPosition(portal, reverse);
            SoundManager.PlayOneShotUISE(40000032);
            GameObject effect = ResourceUtility.Instantiate <Object>(topEffectPrefab) as GameObject;
            rymFX      rym    = effect.GetComponent <rymFX>();
            rym.Cameras = (Camera[])new Camera[1]
            {
                _camera
            };
            rym.ViewShift = 0f;
            portal.Open(effect.get_transform(), regionMapRoot.animator, false, 1f, delegate
            {
                //IL_0037: Unknown result type (might be due to invalid IL or missing references)
                //IL_004b: Unknown result type (might be due to invalid IL or missing references)
                //IL_005b: Unknown result type (might be due to invalid IL or missing references)
                //IL_008f: Unknown result type (might be due to invalid IL or missing references)
                if (!((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003C_003Ef__this.calledExit)
                {
                    GameObject val = ((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003C_003Ef__this.CreateLocationSpot(((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003Cportal_003E__0.toLocation, SpotManager.ICON_TYPE.CHILD_REGION, true);
                    if (val != null)
                    {
                        val.get_transform().set_localScale(new Vector3(0.1f, 0.1f, 0.1f));
                        TweenScale.Begin(val, 0.3f, Vector3.get_one());
                    }
                    ((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003C_003Ef__this.StartCoroutine(((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003C_003Ef__this.DoExitEvent(((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003Cportal_003E__0, ((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003Crym_003E__3, 0f, ((_003CDoOpenNewDungeon_003Ec__Iterator166) /*Error near IL_015b: stateMachine*/)._003Creverse_003E__1, true));
                }
            });
        }
    }
Beispiel #14
0
    protected Transform CreateEffect(GameObject effect_prefab, Transform parent)
    {
        //IL_0018: Unknown result type (might be due to invalid IL or missing references)
        Transform val = ResourceUtility.Realizes(effect_prefab, parent, -1);

        if (val == null)
        {
            return(null);
        }
        val.get_gameObject().set_tag("Direction");
        rymFX component = val.GetComponent <rymFX>();

        if (component != null && useCamera != null)
        {
            component.Cameras = (Camera[])new Camera[1]
            {
                MonoBehaviourSingleton <AppMain> .I.mainCamera
            };
        }
        return(val);
    }
Beispiel #15
0
    private void Awake()
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_0006: Expected O, but got Unknown
        //IL_0009: Unknown result type (might be due to invalid IL or missing references)
        //IL_000e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0015: Unknown result type (might be due to invalid IL or missing references)
        //IL_001a: Unknown result type (might be due to invalid IL or missing references)
        //IL_0021: Unknown result type (might be due to invalid IL or missing references)
        //IL_0026: Unknown result type (might be due to invalid IL or missing references)
        //IL_002d: Unknown result type (might be due to invalid IL or missing references)
        Transform val = this.get_transform();

        defaultPosition = val.get_localPosition();
        defaultRotation = val.get_localRotation();
        defaultScale    = val.get_localScale();
        defaultLayer    = this.get_gameObject().get_layer();
        this.GetComponentsInChildren <Component>(true, defaultComponents);
        fx   = this.GetComponent <rymFX>();
        ctrl = this.GetComponent <EffectCtrl>();
    }
    protected void PlayUnlockPortalTween(string effectName)
    {
        Transform ctrl = GetCtrl(UI.OBJ_UNLOCK_PORTAL_ROOT);

        if (ctrl != null)
        {
            Transform uIEffect = EffectManager.GetUIEffect(effectName, ctrl, -0.2f, 0, null);
            if (uIEffect != null)
            {
                rymFX component = uIEffect.GetComponent <rymFX>();
                if (component != null)
                {
                    component.ChangeRenderQueue = 3999;
                }
            }
        }
        PlayTween(baseRoot, UI.OBJ_UNLOCK_PORTAL_ROOT, true, delegate
        {
            PlayAudio(AUDIO.UNLOCKE_PORTAL, 1f, true);
        }, false, 0);
    }
    public void OpenDropObject()
    {
        //IL_005a: Unknown result type (might be due to invalid IL or missing references)
        if (!isOpend)
        {
            isOpend = true;
            SoundManager.PlayOneShotUISE(10000071);
            if (animEventProcessor != null)
            {
                animEventProcessor.CrossFade(openAnimHash, 0f);
            }
            effect = EffectManager.GetEffect("ef_btl_treasurebox_01", null);
            effect.set_position(_transform.get_position());
            rymFX component = effect.GetComponent <rymFX>();
            if (component != null)
            {
                component.AutoDelete = true;
                component.LoopEnd    = true;
            }
            MonoBehaviourSingleton <CoopNetworkManager> .I.RewardGet(rewardId);

            if (deliveryInfo != null && deliveryInfo.Count > 0)
            {
                SoundManager.PlayOneShotUISE(40000155);
            }
            else if (isRare)
            {
                SoundManager.PlayOneShotUISE(40000154);
            }
            else
            {
                SoundManager.PlayOneShotUISE(10000064);
            }
            animationStep = AnimationStep.OPEN;
        }
    }
    private void LateUpdate()
    {
        //IL_0012: Unknown result type (might be due to invalid IL or missing references)
        //IL_006d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0073: Unknown result type (might be due to invalid IL or missing references)
        //IL_0084: Unknown result type (might be due to invalid IL or missing references)
        //IL_0089: Unknown result type (might be due to invalid IL or missing references)
        //IL_0099: Unknown result type (might be due to invalid IL or missing references)
        //IL_009e: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
        //IL_013d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0142: Unknown result type (might be due to invalid IL or missing references)
        //IL_0183: Unknown result type (might be due to invalid IL or missing references)
        //IL_018a: Expected O, but got Unknown
        //IL_0190: Unknown result type (might be due to invalid IL or missing references)
        //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d6: Unknown result type (might be due to invalid IL or missing references)
        //IL_01db: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e7: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e8: Unknown result type (might be due to invalid IL or missing references)
        //IL_01ed: Unknown result type (might be due to invalid IL or missing references)
        //IL_020e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0219: Unknown result type (might be due to invalid IL or missing references)
        //IL_022f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0234: Unknown result type (might be due to invalid IL or missing references)
        //IL_0247: Unknown result type (might be due to invalid IL or missing references)
        //IL_024c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0251: Unknown result type (might be due to invalid IL or missing references)
        //IL_0252: Unknown result type (might be due to invalid IL or missing references)
        //IL_0257: Unknown result type (might be due to invalid IL or missing references)
        //IL_0259: Unknown result type (might be due to invalid IL or missing references)
        //IL_025a: Unknown result type (might be due to invalid IL or missing references)
        //IL_025c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0261: Unknown result type (might be due to invalid IL or missing references)
        //IL_0269: Unknown result type (might be due to invalid IL or missing references)
        //IL_0270: Unknown result type (might be due to invalid IL or missing references)
        //IL_0280: Unknown result type (might be due to invalid IL or missing references)
        //IL_0285: Unknown result type (might be due to invalid IL or missing references)
        //IL_029d: Unknown result type (might be due to invalid IL or missing references)
        //IL_02be: Unknown result type (might be due to invalid IL or missing references)
        //IL_02ef: Unknown result type (might be due to invalid IL or missing references)
        if (targetObject == null)
        {
            this.get_gameObject().SetActive(false);
        }
        else
        {
            if (animEventProcessor != null)
            {
                animEventProcessor.Update();
            }
            switch (animationStep)
            {
            case AnimationStep.MOVE_TO_TARGET_POS:
            {
                animationTimer += Time.get_deltaTime();
                Vector3 position2 = Vector3.Lerp(dropPos, targetPos, animationTimer / MOVE_TO_TARGET_TIME);
                float   x         = position2.x;
                Vector3 position3 = _transform.get_position();
                position2._002Ector(x, position3.y, position2.z);
                _transform.set_position(position2);
                if (animationTimer >= MOVE_TO_TARGET_TIME)
                {
                    animationStep = AnimationStep.DROP_TO_GROUND;
                }
                break;
            }

            case AnimationStep.DROP_TO_GROUND:
            {
                AnimatorStateInfo currentAnimatorStateInfo2 = animator.GetCurrentAnimatorStateInfo(0);
                if (currentAnimatorStateInfo2.get_fullPathHash() == endAnimHash)
                {
                    targetPoint   = this.GetComponent <TargetPoint>();
                    animationStep = AnimationStep.NONE;
                }
                if (isRare)
                {
                    SoundManager.PlayOneShotUISE(10000061);
                }
                else
                {
                    SoundManager.PlayOneShotUISE(10000062);
                }
                break;
            }

            case AnimationStep.OPEN:
            {
                AnimatorStateInfo currentAnimatorStateInfo = animator.GetCurrentAnimatorStateInfo(0);
                if (currentAnimatorStateInfo.get_fullPathHash() == openAnimHash && currentAnimatorStateInfo.get_normalizedTime() > 0.99f)
                {
                    animationStep = AnimationStep.NONE;
                    if (effect != null)
                    {
                        EffectManager.ReleaseEffect(effect.get_gameObject(), true, false);
                    }
                    this.get_gameObject().SetActive(false);
                }
                break;
            }

            case AnimationStep.GET:
                if (distanceAnim.IsPlaying())
                {
                    moveTime += Time.get_deltaTime();
                    Bounds  bounds    = targetObject._collider.get_bounds();
                    Vector3 center    = bounds.get_center();
                    Vector3 val       = _transform.get_position() - center;
                    float   magnitude = val.get_magnitude();
                    if (distance < magnitude)
                    {
                        distance = magnitude;
                    }
                    val = val.get_normalized() * distance * (1f - distanceAnim.Update());
                    Vector3 val2     = Quaternion.AngleAxis(moveTime * speedAnim.Update(), Vector3.get_up()) * val;
                    Vector3 position = center + val2;
                    _transform.set_position(position);
                    Vector3 localScale = Vector3.get_one() * scaleAnim.Update();
                    if (distanceAnim.IsPlaying())
                    {
                        _transform.set_localScale(localScale);
                    }
                }
                else
                {
                    Transform val3 = EffectManager.GetEffect("ef_btl_mpdrop_01", null);
                    val3.set_position(_transform.get_position());
                    rymFX component = val3.GetComponent <rymFX>();
                    if (component != null)
                    {
                        component.AutoDelete = true;
                        component.LoopEnd    = true;
                    }
                    this.get_gameObject().SetActive(false);
                }
                break;
            }
        }
    }
    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();
    }
Beispiel #20
0
    public static Transform EffectEventExec(ID id, AnimEventData.EventData data, Transform transform, bool is_oneshot_priority, EffectNameAnalyzer name_analyzer = null, NodeFinder node_finder = null, Character chara = null)
    {
        //IL_0204: Unknown result type (might be due to invalid IL or missing references)
        //IL_0209: Unknown result type (might be due to invalid IL or missing references)
        //IL_020c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0210: Unknown result type (might be due to invalid IL or missing references)
        //IL_023b: Unknown result type (might be due to invalid IL or missing references)
        //IL_025e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0263: Unknown result type (might be due to invalid IL or missing references)
        //IL_02d2: Unknown result type (might be due to invalid IL or missing references)
        //IL_02d7: Unknown result type (might be due to invalid IL or missing references)
        //IL_02da: Unknown result type (might be due to invalid IL or missing references)
        //IL_02de: Unknown result type (might be due to invalid IL or missing references)
        //IL_0309: Unknown result type (might be due to invalid IL or missing references)
        //IL_032c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0331: Unknown result type (might be due to invalid IL or missing references)
        //IL_034a: Unknown result type (might be due to invalid IL or missing references)
        //IL_034f: Unknown result type (might be due to invalid IL or missing references)
        //IL_036b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0370: Unknown result type (might be due to invalid IL or missing references)
        //IL_0375: Unknown result type (might be due to invalid IL or missing references)
        //IL_0379: Unknown result type (might be due to invalid IL or missing references)
        //IL_0396: Unknown result type (might be due to invalid IL or missing references)
        //IL_039b: Unknown result type (might be due to invalid IL or missing references)
        //IL_03a0: Unknown result type (might be due to invalid IL or missing references)
        //IL_03a5: Unknown result type (might be due to invalid IL or missing references)
        //IL_03a7: Unknown result type (might be due to invalid IL or missing references)
        //IL_03a9: Unknown result type (might be due to invalid IL or missing references)
        //IL_03ab: Unknown result type (might be due to invalid IL or missing references)
        //IL_03ad: Unknown result type (might be due to invalid IL or missing references)
        //IL_03b6: Unknown result type (might be due to invalid IL or missing references)
        //IL_03bb: Unknown result type (might be due to invalid IL or missing references)
        //IL_03bf: Unknown result type (might be due to invalid IL or missing references)
        //IL_03c4: Unknown result type (might be due to invalid IL or missing references)
        //IL_03c8: Unknown result type (might be due to invalid IL or missing references)
        //IL_03dd: Unknown result type (might be due to invalid IL or missing references)
        //IL_03df: Unknown result type (might be due to invalid IL or missing references)
        //IL_03e3: Unknown result type (might be due to invalid IL or missing references)
        //IL_03ea: Unknown result type (might be due to invalid IL or missing references)
        if (id != ID.EFFECT && id != ID.EFFECT_ONESHOT && id != ID.EFFECT_STATIC && id != ID.EFFECT_LOOP_CUSTOM && id != ID.EFFECT_DEPEND_SP_ATTACK_TYPE && id != ID.EFFECT_DEPEND_WEAPON_ELEMENT && id != ID.EFFECT_SCALE_DEPEND_VALUE && id != ID.CAMERA_EFFECT)
        {
            return(null);
        }
        Transform val    = null;
        string    empty  = string.Empty;
        string    empty2 = string.Empty;

        if (id == ID.EFFECT_DEPEND_SP_ATTACK_TYPE)
        {
            if (object.ReferenceEquals(chara, null))
            {
                return(null);
            }
            Player player = chara as Player;
            if (object.ReferenceEquals(player, null))
            {
                return(null);
            }
            int num = (int)(1 + player.spAttackType);
            if (num >= data.stringArgs.Length)
            {
                return(null);
            }
            empty  = data.stringArgs[num];
            empty2 = data.stringArgs[0];
        }
        else
        {
            empty  = data.stringArgs[0];
            empty2 = ((data.stringArgs.Length <= 1) ? string.Empty : data.stringArgs[1]);
        }
        if (name_analyzer != null)
        {
            empty = name_analyzer(empty);
            if (empty == null)
            {
                return(null);
            }
        }
        int   num2 = data.floatArgs.Length;
        float num3 = (num2 <= 0) ? 1f : data.floatArgs[0];

        if (id == ID.CAMERA_EFFECT)
        {
            return(CreateCameraEffect(empty, num3, data));
        }
        Transform val2 = (node_finder != null) ? node_finder(empty2) : ((!string.IsNullOrEmpty(empty2)) ? Utility.Find(transform, empty2) : transform);

        switch (id)
        {
        case ID.EFFECT:
        case ID.EFFECT_STATIC:
        case ID.EFFECT_LOOP_CUSTOM:
        case ID.EFFECT_DEPEND_SP_ATTACK_TYPE:
        case ID.EFFECT_SCALE_DEPEND_VALUE:
            val = EffectManager.GetEffect(empty, val2);
            if (val == null)
            {
                Log.Warning("Failed to create effect!! " + empty);
            }
            else
            {
                if (id == ID.EFFECT_SCALE_DEPEND_VALUE && !object.ReferenceEquals(chara, null))
                {
                    num3 = chara.GetEffectScaleDependValue();
                }
                Vector3 localScale2 = val.get_localScale();
                val.set_localScale(localScale2 * num3);
                if (num2 >= 7)
                {
                    val.set_localPosition(new Vector3(data.floatArgs[1], data.floatArgs[2], data.floatArgs[3]));
                    val.set_localRotation(Quaternion.Euler(new Vector3(data.floatArgs[4], data.floatArgs[5], data.floatArgs[6])));
                }
            }
            break;

        case ID.EFFECT_DEPEND_WEAPON_ELEMENT:
        {
            Player player2 = chara as Player;
            if (!(player2 == null))
            {
                int currentWeaponElement = player2.GetCurrentWeaponElement();
                if (currentWeaponElement >= 0 && currentWeaponElement < 6)
                {
                    val = EffectManager.GetEffect(empty + currentWeaponElement.ToString(), val2);
                    if (!(val == null))
                    {
                        Vector3 localScale = val.get_localScale();
                        val.set_localScale(localScale * num3);
                        if (num2 >= 7)
                        {
                            val.set_localPosition(new Vector3(data.floatArgs[1], data.floatArgs[2], data.floatArgs[3]));
                            val.set_localRotation(Quaternion.Euler(new Vector3(data.floatArgs[4], data.floatArgs[5], data.floatArgs[6])));
                        }
                    }
                }
            }
            break;
        }

        case ID.EFFECT_ONESHOT:
        {
            Vector3    pos;
            Quaternion rot;
            if (num2 >= 7)
            {
                Matrix4x4  localToWorldMatrix = val2.get_localToWorldMatrix();
                Vector3    val3 = localToWorldMatrix.MultiplyPoint3x4(new Vector3(data.floatArgs[1], data.floatArgs[2], data.floatArgs[3]));
                Quaternion val4 = val2.get_rotation() * Quaternion.Euler(new Vector3(data.floatArgs[4], data.floatArgs[5], data.floatArgs[6]));
                pos = val3;
                rot = val4;
            }
            else
            {
                pos = val2.get_position();
                rot = val2.get_rotation();
            }
            if (val2.get_gameObject().get_activeInHierarchy())
            {
                EffectManager.OneShot(empty, pos, rot, val2.get_lossyScale() * num3, is_oneshot_priority, delegate(Transform effect)
                    {
                        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
                        rymFX component = effect.get_gameObject().GetComponent <rymFX>();
                        if (component != null)
                        {
                            component.LoopEnd    = true;
                            component.AutoDelete = true;
                        }
                    });
            }
            break;
        }
        }
        return(val);
    }
Beispiel #21
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();
                }
            }
        }
    }
 public static void ReleaseEffect(GameObject effect_object, bool isPlayEndAnimation = true, bool immediate = false)
 {
     //IL_0072: Unknown result type (might be due to invalid IL or missing references)
     if (!(effect_object == null))
     {
         if (!MonoBehaviourSingleton <EffectManager> .IsValid())
         {
             Object.Destroy(effect_object);
         }
         else
         {
             EffectManager       i         = MonoBehaviourSingleton <EffectManager> .I;
             EffectInfoComponent component = effect_object.GetComponent <EffectInfoComponent>();
             if (component != null && component.destroyLoopEnd)
             {
                 component.SetLoopAudioObject(null);
                 rymFX      component2 = effect_object.GetComponent <rymFX>();
                 EffectCtrl effectCtrl = null;
                 if (component2 == null)
                 {
                     effectCtrl = effect_object.GetComponent <EffectCtrl>();
                 }
                 if (effectCtrl == null && effect_object.get_transform().get_childCount() > 0)
                 {
                     effect_object.GetComponentsInChildren <Renderer>(Temporary.rendererList);
                     int j = 0;
                     for (int count = Temporary.rendererList.Count; j < count; j++)
                     {
                         Temporary.rendererList[j].set_enabled(false);
                     }
                     Temporary.rendererList.Clear();
                 }
                 effect_object.GetComponents <Trail>(Temporary.trailList);
                 bool flag = false;
                 if (component2 != null && component2.get_enabled())
                 {
                     component2.AutoDelete = true;
                     component2.LoopEnd    = true;
                     flag = true;
                 }
                 else if (effectCtrl != null && effectCtrl.get_enabled())
                 {
                     effectCtrl.EndLoop(isPlayEndAnimation);
                     flag = true;
                 }
                 if (flag && !immediate)
                 {
                     int k = 0;
                     for (int count2 = Temporary.trailList.Count; k < count2; k++)
                     {
                         Temporary.trailList[k].StartDeleteFade();
                     }
                     Temporary.trailList.Clear();
                 }
                 else
                 {
                     i.StockOrDestroy(effect_object, true);
                     int l = 0;
                     for (int count3 = Temporary.trailList.Count; l < count3; l++)
                     {
                         Temporary.trailList[l].SetAutoDelete();
                     }
                     Temporary.trailList.Clear();
                 }
             }
             else
             {
                 i.StockOrDestroy(effect_object, true);
             }
         }
     }
 }
    public static void SetUIEffectDepth(Transform effect, Transform parent, float z = -0.001f, int add_render_queue = 0, UIWidget ref_render_queue = null)
    {
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_001f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0024: Unknown result type (might be due to invalid IL or missing references)
        effect.set_localPosition(effect.get_localPosition() + new Vector3(0f, 0f, z));
        if (ref_render_queue == null)
        {
            ref_render_queue = parent.GetComponentInChildren <UIWidget>();
        }
        rymFX fx = effect.GetComponent <rymFX>();

        if (fx != null)
        {
            fx.Cameras = MonoBehaviourSingleton <UIManager> .I.cameras;
            if (ref_render_queue != null)
            {
                UIWidget uIWidget = ref_render_queue;
                uIWidget.onRender = (UIDrawCall.OnRenderCallback) Delegate.Combine(uIWidget.onRender, (UIDrawCall.OnRenderCallback) delegate(Material mate)
                {
                    if (fx != null)
                    {
                        fx.SetRenderQueue(mate.get_renderQueue() + add_render_queue);
                    }
                });
            }
            else
            {
                fx.ChangeRenderQueue = 3000 + add_render_queue;
            }
        }
        else if (effect.GetComponent <EffectCtrl>() != null)
        {
            Renderer[] renderers = effect.GetComponentsInChildren <Renderer>();
            if (renderers.Length > 0)
            {
                UIWidget uIWidget2 = ref_render_queue;
                uIWidget2.onRender = (UIDrawCall.OnRenderCallback) Delegate.Combine(uIWidget2.onRender, (UIDrawCall.OnRenderCallback) delegate(Material mate)
                {
                    int renderQueue = mate.get_renderQueue() + add_render_queue;
                    int i           = 0;
                    for (int num = renderers.Length; i < num; i++)
                    {
                        Renderer val = renderers[i];
                        if (val != null)
                        {
                            Material[] materials = val.get_materials();
                            int j = 0;
                            for (int num2 = materials.Length; j < num2; j++)
                            {
                                Material val2 = materials[j];
                                if (val2 != null)
                                {
                                    val2.set_renderQueue(renderQueue);
                                }
                            }
                        }
                    }
                });
            }
        }
    }
Beispiel #24
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();
    }
Beispiel #25
0
    public void OpenNewLocation()
    {
        //IL_004e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0122: Unknown result type (might be due to invalid IL or missing references)
        //IL_0145: Expected O, but got Unknown
        RegionMapPortal portal;
        bool            reverse = IsPortalReverseAndGetPortalData((int)portalData.portalID, out portal);

        if (portal == null)
        {
            RequestEvent("EXIT", null);
        }
        else
        {
            string text = portal.get_gameObject().get_name();
            if (reverse)
            {
                text += "_R";
            }
            regionMapRoot.animator.Play(text);
            SetCameraToMiddlePoint(portal);
            SetPlayerMakerToStartPosition(portal, reverse);
            GameObject effect = ResourceUtility.Instantiate <Object>(topEffectPrefab) as GameObject;
            rymFX      rym    = effect.GetComponent <rymFX>();
            rym.Cameras = (Camera[])new Camera[1]
            {
                _camera
            };
            rym.ViewShift = 0f;
            float endTime = 1f;
            if (eventData.IsEncounterBossEvent())
            {
                endTime = 0.4f;
            }
            SoundManager.PlayOneShotUISE(40000032);
            portal.Open(effect.get_transform(), regionMapRoot.animator, reverse, endTime, delegate
            {
                //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
                //IL_00f5: Unknown result type (might be due to invalid IL or missing references)
                //IL_0109: Unknown result type (might be due to invalid IL or missing references)
                //IL_0119: Unknown result type (might be due to invalid IL or missing references)
                //IL_0157: Unknown result type (might be due to invalid IL or missing references)
                if (!calledExit)
                {
                    RegionMapLocation location = portal.toLocation;
                    if (eventData.IsEncounterBossEvent())
                    {
                        if (MonoBehaviourSingleton <UIInGameFieldQuestWarning> .IsValid())
                        {
                            MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.Play(eventData.enemyType, 0, false);
                            MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.FadeOut(MonoBehaviourSingleton <GlobalSettingsManager> .I.worldMapParam.encounterBossCutInTime + 2f, 0.3f, delegate
                            {
                                if (fieldQuestWarningRoot != null)
                                {
                                    Object.Destroy(fieldQuestWarningRoot);
                                }
                            });
                        }
                        if (effect != null)
                        {
                            EffectManager.ReleaseEffect(effect, true, false);
                        }
                        this.StartCoroutine(DoExitEncounterBossEvent());
                    }
                    else
                    {
                        if (reverse)
                        {
                            location = portal.fromLocation;
                        }
                        GameObject val = CreateLocationSpot(location, SpotManager.ICON_TYPE.NEW, true);
                        if (val != null)
                        {
                            val.get_transform().set_localScale(new Vector3(0.1f, 0.1f, 0.1f));
                            TweenScale.Begin(val, 0.3f, Vector3.get_one());
                            SoundManager.PlayOneShotUISE(40000033);
                        }
                        this.StartCoroutine(DoExitEvent(portal, rym, 0f, reverse, false));
                    }
                }
            });
        }
    }