| | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | //剧情对话面板
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | MainInterfaceWin.IsOpenMaininterface += IsOpenMaininterface;
|
| | | timeType = 0;
|
| | | m_NextText.text = string.Format(Language.Get("TaskContinueCount"), AwaitSecond);
|
| | | IsCloseWindow();
|
| | |
| | | }
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | MainInterfaceWin.IsOpenMaininterface -= IsOpenMaininterface;
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen("MainInterfaceWin"))
|
| | | {
|
| | | WindowCenter.Instance.Close<DialogueDuidanceWin>();
|
| | | }
|
| | |
|
| | | timeType += Time.deltaTime;
|
| | | if (timeType >= AwaitSecond)
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | m_NextText.text= string.Format(Language.Get("TaskContinueCount"), AwaitSecond - (int)timeType);
|
| | | m_NextText.text = string.Format(Language.Get("TaskContinueCount"), AwaitSecond - (int)timeType);
|
| | | }
|
| | |
|
| | | if (this is BossShowDialogueWin)
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (!WindowCenter.Instance.IsOpen<DialogueDuidanceWin>())
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | if (hero != null && hero.LockTarget != null)
|
| | | {
|
| | | return;
|
| | | var checkDistSqrt = MathUtility.DistanceSqrtXZ(hero.Pos, hero.LockTarget.Pos);
|
| | | if (checkDistSqrt > Mathf.Pow(GeneralDefine.FarawayNpcDist, 2))
|
| | | {
|
| | | WindowCenter.Instance.Close<DialogueDuidanceWin>();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | hero.LockTarget = null;
|
| | | }
|
| | | }
|
| | |
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (_hero.LockTarget == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | float _chkDistSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, _hero.LockTarget.Pos);
|
| | | if (_chkDistSqrt > Mathf.Pow(GeneralDefine.FarawayNpcDist, 2))
|
| | | {
|
| | |
|
| | | WindowCenter.Instance.Close<DialogueDuidanceWin>();
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | |
|
| | | _hero.LockTarget = null;
|
| | | }
|
| | | }
|
| | | private void OnClickMarkRay()
|
| | | {
|
| | |
| | | {
|
| | | m_ContentText_Npc.text = taskInfo.show_writing;
|
| | | }
|
| | | |
| | |
|
| | | var data = new UI3DNPCExhibitionData()
|
| | | {
|
| | | npcId = npcId,
|
| | | isDialogue = true,
|
| | | };
|
| | | UI3DModelExhibition.Instance.ShowNPC(m_NPCIcon,data);
|
| | | UI3DModelExhibition.Instance.ShowNPC(m_NPCIcon, data);
|
| | | }
|
| | | typesPeaker = type;
|
| | | }
|