Exemplo n.º 1
0
    public Transform FindNode(int mapId, out Vector3 offset, out bool isBattle)
    {
        //IL_002d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0032: Expected O, but got Unknown
        //IL_0064: Unknown result type (might be due to invalid IL or missing references)
        //IL_0069: Expected O, but got Unknown
        offset._002Ector(0f, 0f, 0f);
        isBattle = false;
        ExploreMapLocation exploreMapLocation = FindLocation(mapId);

        if (null != exploreMapLocation)
        {
            return(exploreMapLocation.get_transform());
        }
        if (MonoBehaviourSingleton <QuestManager> .I.GetExploreBossBatlleMapId() == mapId)
        {
            isBattle           = true;
            exploreMapLocation = FindLocation(MonoBehaviourSingleton <QuestManager> .I.GetExploreBossAppearMapId());
            if (exploreMapLocation != null)
            {
                return(exploreMapLocation.get_transform());
            }
        }
        return(null);
    }
Exemplo n.º 2
0
    private IEnumerator DoExitEvent()
    {
        selfMarker_.get_gameObject().SetActive(true);
        Vector3   offset     = new Vector3(0f, 0f, 0f);
        Transform portalNode = mapRoot_.FindPortalNode(from_.mapId, to_.mapId);

        if (null == portalNode)
        {
            ExploreMapLocation loc3 = mapRoot_.FindLocation(from_.mapId);
            ExploreMapLocation loc2 = mapRoot_.FindLocation(to_.mapId);
            if (null != loc3 && null != loc2)
            {
                Vector3 pos2 = (loc3.get_transform().get_localPosition() + loc2.get_transform().get_localPosition()) * 0.5f;
                pos2      -= loc3.get_transform().get_localPosition();
                offset     = pos2;
                portalNode = loc3.get_transform();
            }
        }
        if (null == portalNode)
        {
            yield return((object)new WaitForSeconds(0.1f));

            DispatchEvent("EXIT", null);
        }
        else
        {
            if (null != from_)
            {
                if (fromBoss_ && null != portalNode)
                {
                    Utility.Attach(portalNode, selfMarker_);
                    selfMarker_.GetComponent <ExplorePlayerMarker>().SetIndex(0);
                    selfMarker_.set_localPosition(selfMarker_.get_localPosition() + offset);
                }
                else
                {
                    Utility.Attach(from_.get_transform(), selfMarker_);
                    selfMarker_.GetComponent <ExplorePlayerMarker>().SetIndex(0);
                }
                yield return((object)new WaitForSeconds(0.3f));

                TweenScale.Begin(selfMarker_.get_gameObject(), 0.3f, Vector3.get_zero());
                yield return((object)new WaitForSeconds(0.3f));
            }
            else
            {
                selfMarker_.set_localScale(Vector3.get_zero());
                yield return((object)new WaitForSeconds(0.3f));
            }
            yield return((object)new WaitForSeconds(0.3f));

            Utility.Attach(to_.get_transform(), selfMarker_);
            selfMarker_.GetComponent <ExplorePlayerMarker>().SetIndex(0);
            TweenScale.Begin(selfMarker_.get_gameObject(), 0.3f, Vector3.get_one());
            yield return((object)new WaitForSeconds(0.5f));

            if (toBoss_)
            {
                if (MonoBehaviourSingleton <UIInGameFieldQuestWarning> .IsValid())
                {
                    MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.Play(ENEMY_TYPE.NONE, MonoBehaviourSingleton <PartyManager> .I.partyData.quest.explore.isRare, false);

                    MonoBehaviourSingleton <UIInGameFieldQuestWarning> .I.FadeOut(3f, 0.3f, delegate
                    {
                        if (((_003CDoExitEvent_003Ec__Iterator150) /*Error near IL_0403: stateMachine*/)._003C_003Ef__this.fieldQuestWarningRoot != null)
                        {
                            Object.Destroy(((_003CDoExitEvent_003Ec__Iterator150) /*Error near IL_0403: stateMachine*/)._003C_003Ef__this.fieldQuestWarningRoot);
                        }
                    });
                }
                this.StartCoroutine(DoExitEncounterBossEvent());
            }
            else
            {
                DispatchEvent("EXIT", null);
            }
        }
    }