private void RotateSonarEffect(SONAR_DIR dir) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) switch (dir) { case SONAR_DIR.UP: sonarTexture.Rotate(new Vector3(0f, 0f, 0f)); break; case SONAR_DIR.DOWN: sonarTexture.Rotate(new Vector3(0f, 0f, 180f)); break; case SONAR_DIR.LEFT: sonarTexture.Rotate(new Vector3(0f, 0f, 90f)); break; case SONAR_DIR.RIGHT: sonarTexture.Rotate(new Vector3(0f, 0f, -90f)); break; } }
private void PlaySonarEffect(SONAR_DIR dir, Vector3 pos, float size) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) sonarTexture.set_localPosition(pos); float num = size / 100f * mapRoot_.GetMapScale() * mapRoot_.GetSonarOffset(); Vector3 localScale = sonarTexture.get_localScale(); sonarTexture.set_localScale(new Vector3(localScale.x * num, localScale.y * num, localScale.z)); sonarDirEffect.get_gameObject().SetActive(true); RotateSonarEffect(dir); }
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)); } }