| | |
| | | [SerializeField] Text m_PlayerNameText;
|
| | | [SerializeField] Text m_ContentText;
|
| | |
|
| | | [SerializeField] Text m_NextText;
|
| | | [SerializeField] List<int> MysteriousTaskID = new List<int>();//新添神秘任务
|
| | | Dictionary<int, string> PlayerIcon = new Dictionary<int, string>();
|
| | | private int storyMissionsID = 0;//剧情任务ID
|
| | |
| | | private int[] sPeaker;//对话对应半身像(0为主角/1为NPC)
|
| | | private int nowTaskNum = 0;//获取当前的任务
|
| | | private int typesPeaker = -1;
|
| | |
|
| | | private float timeType = 0f;
|
| | | PlayerTaskDatas m_TaskModel;
|
| | | PlayerTaskDatas taskmodel { get { return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<PlayerTaskDatas>()); } }
|
| | |
|
| | |
| | | protected override void OnPreOpen()
|
| | | {
|
| | | MainInterfaceWin.IsOpenMaininterface += IsOpenMaininterface;
|
| | | timeType = 0;
|
| | | m_NextText.text = string.Format(Language.Get("TaskContinueCount"), AwaitSecond);
|
| | | IsCloseWindow();
|
| | | typesPeaker = -1;
|
| | | storyMissionsID = taskmodel._TaskNow;
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | Treasure treasure = null;
|
| | | if (treasureModel.TryGetTreasure(FabaoId, out treasure))
|
| | | {
|
| | | if (treasure.state != TreasureState.Collecting && !NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | | StartCoroutine("GetMainSelfMotion");
|
| | | }
|
| | | //Treasure treasure = null;
|
| | | //if (treasureModel.TryGetTreasure(FabaoId, out treasure))
|
| | | //{
|
| | | // if (treasure.state != TreasureState.Collecting && !NewBieCenter.Instance.inGuiding)
|
| | | // {
|
| | | // StartCoroutine("GetMainSelfMotion");
|
| | | // }
|
| | |
|
| | | }
|
| | | //}
|
| | | }
|
| | | IEnumerator GetMainSelfMotion()
|
| | | {
|
| | | if (mainModel.IsSelfMotionTask)
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS1500;
|
| | | }
|
| | | else
|
| | | {
|
| | | yield return new WaitForSeconds(AwaitSecond);
|
| | | }
|
| | | OnClickSKIPButton();
|
| | | mainModel.IsSelfMotionTask = true;
|
| | | yield break;
|
| | | }
|
| | | //IEnumerator GetMainSelfMotion()
|
| | | //{
|
| | | // if (mainModel.IsSelfMotionTask)
|
| | | // {
|
| | | // yield return WaitingForSecondConst.WaitMS1500;
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // yield return new WaitForSeconds(AwaitSecond);
|
| | | // }
|
| | | // OnClickSKIPButton();
|
| | | // mainModel.IsSelfMotionTask = true;
|
| | | // yield break;
|
| | | //}
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | MainInterfaceWin.IsOpenMaininterface -= IsOpenMaininterface;
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | StopCoroutine("GetMainSelfMotion");
|
| | | // StopCoroutine("GetMainSelfMotion");
|
| | | }
|
| | |
|
| | | private void IsOpenMaininterface()
|
| | |
| | | }
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | base.LateUpdate();
|
| | | timeType += Time.deltaTime;
|
| | | if (timeType >= AwaitSecond)
|
| | | {
|
| | | m_NextText.text = string.Format(Language.Get("TaskContinueCount"), 0);
|
| | | OnClickSKIPButton();
|
| | | mainModel.IsSelfMotionTask = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_NextText.text= string.Format(Language.Get("TaskContinueCount"), AwaitSecond - (int)timeType);
|
| | | }
|
| | |
|
| | | if (this is BossShowDialogueWin)
|
| | | {
|
| | |
| | | }
|
| | | private void OnClickMarkRay()
|
| | | {
|
| | | timeType = 0;
|
| | | var config = Config.Instance.Get<StoryMissionsConfig>(storyMissionsID);
|
| | | if (config == null)
|
| | | {
|