Beispiel #1
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 #2
0
    public unsafe void Recycle(Transform parent, int layer = -1)
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_0006: Expected O, but got Unknown
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
        //IL_00bd: Expected O, but got Unknown
        //IL_00dd: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
        //IL_0123: Unknown result type (might be due to invalid IL or missing references)
        //IL_0128: Unknown result type (might be due to invalid IL or missing references)
        //IL_0131: Unknown result type (might be due to invalid IL or missing references)
        //IL_0136: Unknown result type (might be due to invalid IL or missing references)
        //IL_0146: Unknown result type (might be due to invalid IL or missing references)
        //IL_0148: Unknown result type (might be due to invalid IL or missing references)
        Transform val = this.get_transform();

        val.set_parent(null);
        this.get_gameObject().SetActive(true);
        if (layer == -1)
        {
            layer = defaultLayer;
        }
        Utility.SetLayerWithChildren(val, layer);
        int i = 0;

        for (int count = defaultComponents.Count; i < count; i++)
        {
            Component val2 = defaultComponents[i];
            if (val2 is Trail)
            {
                Trail trail = val2 as Trail;
                trail.set_enabled(true);
                trail.Reset();
                trail.emit = true;
            }
            else if (val2 is Renderer)
            {
                (val2 as Renderer).set_enabled(true);
            }
            else if (val2 is Animator)
            {
                Animator val3 = val2 as Animator;
                val3.set_enabled(true);
                RuntimeAnimatorController val4 = val3.get_runtimeAnimatorController();
                val3.set_runtimeAnimatorController(null);
                val3.set_runtimeAnimatorController(val4);
            }
        }
        val.set_localPosition(defaultPosition);
        val.set_localRotation(defaultRotation);
        val.set_localScale(defaultScale);
        Utility.Attach(parent, val);
        if (fx != null)
        {
            fx.LoopEnd = false;
            GetTextureFunc getTextureDelegate = rymFXManager.GetTextureDelegate;
            rymFXManager.GetTextureDelegate = new GetTextureFunc((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/);
            fx.ResetImmediate();
            rymFXManager.GetTextureDelegate = getTextureDelegate;
        }
        if (ctrl != null)
        {
            ctrl.Reset();
        }
        stocking = false;
    }