/// <summary> /// 关闭人物对话框 /// </summary> /// <returns></returns> public async UniTask CloseShowText() { if (_boxBgRect.gameObject.activeSelf) { await ChapterTool.ChangeUiScale(_boxBgRect, Vector3.zero, 0.1f, 10, null, () => { _roleDialogueBoxCloseAction?.Invoke(_dialogueData._Data); _boxBgRect.gameObject.SetActive(false); }); } }
/// <summary> /// 展示对话 /// </summary> /// <param name="data"></param> public async void Show(ChapterFunctionTextDefine data) { await UniTask.WaitUntil(() => !_roleSpeakAeforeAwait); _showText.text = ChapterTool.GetChapterFunctionString(data.ID); _boxBgRect.gameObject.SetActive(true); RefreshGroup(); await ChapterTool.ChangeUiScale(_boxBgRect, Vector3.one, 0.1f, 10); _roleSpeakRearTwoAction?.Invoke(_dialogueData._FunctionData); }
public override async void Show() { base.Show(); _bgBoxRect.localScale = Vector3.zero; gameObject.SetActive(true); OpenClickBtn(false); Debug.Log("Show"); await ChapterTool.ChangeUiScale(_bgBoxRect, Vector3.one, 0.1f, 10, null, () => { OpenClickBtn(true); }); ClickBtn(); }
/// <summary> /// 展示对话 /// </summary> /// <param name="data"></param> public override async UniTask Show(ChapterDialogueTextDefine data) { await base.Show(data); _roleSpeakAeforeAction?.Invoke(data); await UniTask.WaitUntil(() => !_roleSpeakAeforeAwait); _showText.text = ChapterTool.GetDialogueString(_dialogueData._Data); _boxBgRect.gameObject.SetActive(true); RefreshGroup(); await ChapterTool.ChangeUiScale(_boxBgRect, Vector3.one, 0.1f, 10); _roleSpeakRearAction?.Invoke(_dialogueData._Data); }