예제 #1
0
    private void Update()
    {
        //IL_0088: Unknown result type (might be due to invalid IL or missing references)
        //IL_008e: Unknown result type (might be due to invalid IL or missing references)
        if (MonoBehaviourSingleton <StageObjectManager> .IsValid() && MonoBehaviourSingleton <InGameProgress> .IsValid())
        {
            Self self = MonoBehaviourSingleton <StageObjectManager> .I.self;
            if (!(self == null))
            {
                portalReq = null;
                int i = 0;
                for (int count = MonoBehaviourSingleton <InGameProgress> .I.portalObjectList.Count; i < count; i++)
                {
                    PortalObject portalObject = MonoBehaviourSingleton <InGameProgress> .I.portalObjectList[i];
                    if (portalObject.isFull && portalObject.portalData.dstMapID != 0 && Vector3.Distance(portalObject._transform.get_position(), self._position) < 10f)
                    {
                        portalReq = portalObject;
                        break;
                    }
                }
                if (!(portal == portalReq) && !noticeTween.get_isActiveAndEnabled())
                {
                    if (noticeTween.value == 0f)
                    {
                        if (portalReq != null)
                        {
                            if (string.IsNullOrEmpty(portalReq.portalData.placeText))
                            {
                                FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(portalReq.portalData.dstMapID);

                                if (fieldMapData == null)
                                {
                                    return;
                                }
                                nameLabel.text = fieldMapData.mapName;
                            }
                            else
                            {
                                nameLabel.text = portalReq.portalData.placeText;
                            }
                            noticeObject.SetActive(true);
                            noticeTween.PlayForward();
                        }
                        else
                        {
                            noticeObject.SetActive(false);
                        }
                        portal = portalReq;
                    }
                    else
                    {
                        noticeTween.PlayReverse();
                    }
                }
            }
        }
    }
예제 #2
0
    private IEnumerator StartSonar()
    {
        while (!base.isInitialized)
        {
            yield return((object)null);
        }
        int bossMapId = MonoBehaviourSingleton <QuestManager> .I.GetExploreBossAppearMapId();

        Vector3   bossPos      = mapRoot_.GetPositionOnMap(bossMapId);
        int       currentMapId = (int)MonoBehaviourSingleton <FieldManager> .I.currentMapID;
        Vector3   selfPos      = mapRoot_.GetPositionOnMap(currentMapId);
        float     distance     = Vector3.Distance(bossPos, selfPos);
        float     sonarSize    = GetSonarSize(currentMapId);
        bool      find         = distance <= sonarSize;
        SONAR_DIR dir          = CalculateSonarDir(bossPos, selfPos);

        yield return((object)new WaitForSeconds(0.7f));

        PlaySonarEffect(dir, selfPos, sonarSize);
        PlayAudio(AUDIO.SONAR);
        yield return((object)new WaitForSeconds(2f));

        if (mapRoot_.showBattleMarker)
        {
            sonarDirEffect.get_gameObject().SetActive(false);
            MonoBehaviourSingleton <QuestManager> .I.GetExploreBossAppearMapId();

            Vector3 pos = mapRoot_.GetPositionOnMap(bossMapId);
            redCircle.set_localPosition(pos);
            redCircle.get_gameObject().SetActive(true);
            TweenAlpha tweenAlpha2 = redCircle.GetComponent <TweenAlpha>();
            if (null != tweenAlpha2)
            {
                while (tweenAlpha2.get_isActiveAndEnabled())
                {
                    yield return((object)null);
                }
            }
            yield return((object)new WaitForSeconds(0.4f));

            battleIcon.set_localPosition(new Vector3(pos.x + 22f, pos.y + 33f, pos.z));
            battleIcon.get_gameObject().SetActive(true);
            PlayAudio(AUDIO.MARKER);
        }
        else if (find && !redCircle.get_gameObject().get_activeSelf())
        {
            sonarDirEffect.get_gameObject().SetActive(false);
            redCircle.set_localPosition(bossPos);
            redCircle.get_gameObject().SetActive(true);
            TweenAlpha tweenAlpha = redCircle.GetComponent <TweenAlpha>();
            if (null != tweenAlpha)
            {
                while (tweenAlpha.get_isActiveAndEnabled())
                {
                    yield return((object)null);
                }
            }
            yield return((object)new WaitForSeconds(0.4f));

            findIcon.set_localPosition(new Vector3(bossPos.x + 22f, bossPos.y + 33f, bossPos.z));
            findIcon.get_gameObject().SetActive(true);
            PlayAudio(AUDIO.MARKER);
        }
        if (tapToSkip != null)
        {
            tapToSkip.get_gameObject().SetActive(true);
            UIEventListener uIEventListener = bgEventListener;
            uIEventListener.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onClick, new UIEventListener.VoidDelegate(onClick));
        }
    }