StoryDialogView.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. using FairyGUI;
  2. using UnityEngine;
  3. using UI.Main;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.Text.RegularExpressions;
  7. namespace GFGGame
  8. {
  9. public delegate void OnCompleteStoryDialogCall(bool isSkip, object param);
  10. public class StoryDialogView : BaseView
  11. {
  12. private UI_StoryDialogUI _ui;
  13. private UI_CompArrow _arrow;
  14. private GameObject _sceneObject;
  15. private GameObject _scenePrefab;
  16. private GameObject _npcHead;
  17. private DressUpObjUI _dressUpObjUI;
  18. private GoWrapper _npcWrapper;
  19. private GTextField _wordTextField;
  20. //剧情完成回调
  21. private OnCompleteStoryDialogCall _onCompleteStoryDialogCall;
  22. private object _onCompleteStoryDialogCallParam;
  23. //回顾
  24. private List<string> _dialogListLookBack;
  25. //自动播放
  26. private int _speedAutoPlay = 1;
  27. private bool _autoPlay = false;
  28. //剧情状态
  29. private List<StoryDialogCfg> _stepListToRead;
  30. private StoryDialogCfg _currentStepCfg;
  31. private string _nextStepId;
  32. private string[] _wordList;
  33. private int _wordIndex = 0;
  34. private bool _isShowLetters;
  35. private string _currentWords;
  36. private string _stroyStartID;
  37. public override void Dispose()
  38. {
  39. base.Dispose();
  40. if (_sceneObject != null)
  41. {
  42. GameObject.Destroy(_sceneObject);
  43. _sceneObject = null;
  44. }
  45. _dressUpObjUI?.Dispose();
  46. _dressUpObjUI = null;
  47. _wordTextField = null;
  48. _arrow = null;
  49. _isShowLetters = false;
  50. SceneController.DestroyObjectFromView(_npcHead, _npcWrapper);
  51. Timers.inst.Remove(UpdateLetters);
  52. if (_ui != null)
  53. {
  54. _ui.Dispose();
  55. _ui = null;
  56. }
  57. }
  58. protected override void Init()
  59. {
  60. base.Init();
  61. packageName = UI_StoryDialogUI.PACKAGE_NAME;
  62. _ui = UI_StoryDialogUI.Create();
  63. viewCom = _ui.target;
  64. isfullScreen = true;
  65. _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneStoryDialog"));
  66. }
  67. protected override void OnInit()
  68. {
  69. base.OnInit();
  70. _ui.m_dialogText.target.visible = false;
  71. _ui.m_dialogName.target.visible = false;
  72. _ui.m_dialogHead.target.visible = false;
  73. _ui.m_list.visible = false;
  74. _ui.m_btnNext.width = GRoot.inst.width;
  75. _ui.m_btnNext.height = GRoot.inst.height;
  76. _ui.m_btnNext.AddRelation(GRoot.inst, RelationType.Size);
  77. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  78. _ui.m_btnNext.onClick.Add(OnClickBtnNext);
  79. _ui.m_btnLookBack.onClick.Add(OnClickBtnLookBack);
  80. _ui.m_btnSkip.onClick.Add(OnBtnSkip);
  81. _ui.m_list.onClickItem.Add(OnClickListItem);
  82. _ui.m_btnSpeedUp.onClick.Add(OnClickBtnSpeedUp);
  83. _ui.m_btnAutoPlay.onClick.Add(OnClickBtnAutoPlay);
  84. }
  85. protected override void OnShown()
  86. {
  87. base.OnShown();
  88. if (_sceneObject == null)
  89. {
  90. _sceneObject = GameObject.Instantiate(_scenePrefab);
  91. }
  92. if (_dressUpObjUI == null)
  93. {
  94. _dressUpObjUI = new DressUpObjUI();
  95. }
  96. _speedAutoPlay = FightDataManager.Instance.dialogSpeed;
  97. _autoPlay = false;
  98. UpdateSpeedUpBtn();
  99. _dialogListLookBack = new List<string>();
  100. object[] datas = viewData as object[];
  101. _stroyStartID = (string)datas[0];
  102. bool skipable = (bool)datas[1];
  103. _onCompleteStoryDialogCall = (OnCompleteStoryDialogCall)datas[2];
  104. if (datas.Length > 3)
  105. {
  106. _onCompleteStoryDialogCallParam = datas[3];
  107. }
  108. //
  109. // StoryChapterCfg chapterCfg0 = StoryChapterCfgArray.Instance.GetCfg(MainStoryDataManager.currentChapterCfgId);
  110. // List<StoryLevelCfg> storyLevelCfg0 = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg0.type, chapterCfg0.subType, chapterCfg0.id);
  111. StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(MainStoryDataManager.currentChapterCfgId);
  112. StoryLevelCfg storyLevelCfg = chapterCfg == null ? null : StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id)[0];
  113. if (LauncherConfig.netType == LauncherConfig.EnumNetType.TEMP && chapterCfg != null && storyLevelCfg != null && MainStoryDataManager.currentChapterCfgId == 10001 && storyLevelCfg.order == 1 && !InstanceZonesDataManager.CheckLevelPass(storyLevelCfg.id))
  114. {
  115. // 临时设置都可以跳过对话
  116. skipable = false;
  117. }
  118. else
  119. {
  120. skipable = true;
  121. }
  122. _ui.m_btnSkip.visible = skipable;
  123. ShowNextStep(_stroyStartID);
  124. _ui.m_c1.selectedIndex = 0;
  125. _ui.m_btnAutoPlay.selected = false;
  126. if (_stroyStartID == MainStoryDataManager.priorId)
  127. {
  128. _ui.m_c1.selectedIndex = 1;
  129. // _ui.m_btnAutoPlay.selected = true;
  130. OnClickBtnAutoPlay();
  131. _speedAutoPlay = 1;
  132. FightDataManager.Instance.dialogSpeed = _speedAutoPlay;
  133. }
  134. }
  135. protected override void OnHide()
  136. {
  137. base.OnHide();
  138. Timers.inst.Remove(UpdateLetters);
  139. Timers.inst.Remove(UpdateShake);
  140. Timers.inst.Remove(OnScreenEffectComplete);
  141. Timers.inst.Remove(ShowNextWords);
  142. ScreenBlackController.Instance.HideBlack();
  143. StopAutoPlay();
  144. if (_sceneObject != null)
  145. {
  146. GameObject.Destroy(_sceneObject);
  147. _sceneObject = null;
  148. }
  149. MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
  150. _onCompleteStoryDialogCall = null;
  151. _onCompleteStoryDialogCallParam = null;
  152. }
  153. private void OnClickBtnBack()
  154. {
  155. // this.Hide();
  156. ViewManager.GoBackFrom(typeof(StoryDialogView).FullName);
  157. // Over(false);
  158. }
  159. private void OnClickBtnNext()
  160. {
  161. // StopAutoPlay();
  162. ShowNextWords();
  163. }
  164. private void OnClickBtnLookBack()
  165. {
  166. if (_ui.m_btnSkip.enabled)
  167. {
  168. ViewManager.Show(ViewName.STORY_LOOK_BACK_VIEW, _stroyStartID);
  169. }
  170. else
  171. {
  172. ViewManager.Show(ViewName.STORY_LOOK_BACK_VIEW, _dialogListLookBack);
  173. }
  174. }
  175. private void OnBtnSkip()
  176. {
  177. Over(true);
  178. }
  179. private void OnClickListItem(EventContext context)
  180. {
  181. UI_ListDialogItem dialogItem = UI_ListDialogItem.Proxy(context.data as GObject);
  182. _dialogListLookBack.Add(dialogItem.m_txtContent.text);
  183. string stepID = (string)dialogItem.target.data;
  184. if (stepID == null)
  185. {
  186. stepID = "0";
  187. }
  188. UI_ListDialogItem.ProxyEnd();
  189. OnStepComplete(stepID);
  190. }
  191. private void OnClickBtnSpeedUp()
  192. {
  193. //如果没有自动播放先开始自动播放
  194. if (!_autoPlay)
  195. {
  196. _ui.m_btnAutoPlay.selected = true;
  197. OnClickBtnAutoPlay();
  198. }
  199. _speedAutoPlay = _speedAutoPlay * 2;
  200. if (_speedAutoPlay > GameConst.MAX_SPEED_AUTO_PLAY)
  201. {
  202. _speedAutoPlay = 1;
  203. }
  204. FightDataManager.Instance.dialogSpeed = _speedAutoPlay;
  205. UpdateSpeedUpBtn();
  206. }
  207. private void OnClickBtnAutoPlay()
  208. {
  209. _autoPlay = _ui.m_btnAutoPlay.selected;
  210. if (_autoPlay)
  211. {
  212. ShowNextWords();
  213. }
  214. }
  215. private void InitStepListById(string dialogID)
  216. {
  217. var temp = StoryDialogCfgArray.Instance.GetCfgsByid(dialogID);
  218. _stepListToRead = new List<StoryDialogCfg>(temp);
  219. }
  220. private void ShowNextStep(string nextStepId)
  221. {
  222. if (nextStepId != null)
  223. {
  224. InitStepListById(nextStepId);
  225. }
  226. if (_stepListToRead != null && _stepListToRead.Count > 0)
  227. {
  228. StoryDialogCfg storyDialogCfg = (StoryDialogCfg)_stepListToRead[0];
  229. _stepListToRead.RemoveAt(0);
  230. InitStepContent(storyDialogCfg);
  231. }
  232. else
  233. {
  234. Over();
  235. }
  236. }
  237. private void OnStepComplete(string nextStepId = null)
  238. {
  239. _nextStepId = nextStepId;
  240. _ui.m_dialogText.target.visible = false;
  241. _ui.m_dialogName.target.visible = false;
  242. _ui.m_dialogHead.target.visible = false;
  243. float delay = 0;
  244. //屏幕效果
  245. if (_currentStepCfg != null)
  246. {
  247. if (_currentStepCfg.blackScreenDur > 0)
  248. {
  249. delay = _currentStepCfg.blackScreenDur;
  250. ScreenBlackController.Instance.ShowBlack(delay, this.viewCom, 0);
  251. }
  252. else if (_currentStepCfg.blankScreenDur > 0)
  253. {
  254. delay = _currentStepCfg.blankScreenDur;
  255. UpdatePic("0");
  256. }
  257. }
  258. if (delay > 0)
  259. {
  260. //转换成秒
  261. delay = delay / 1000f;
  262. Timers.inst.Add(delay, 1, OnScreenEffectComplete);
  263. }
  264. else
  265. {
  266. OnScreenEffectComplete();
  267. }
  268. }
  269. private void OnScreenEffectComplete(object param = null)
  270. {
  271. if (_nextStepId == "0")
  272. {
  273. Over();
  274. }
  275. else
  276. {
  277. ShowNextStep(_nextStepId);
  278. }
  279. }
  280. private void InitStepContent(StoryDialogCfg storyDialogCfg)
  281. {
  282. _currentStepCfg = storyDialogCfg;
  283. UpdateMusic(storyDialogCfg.musicRes);
  284. UpdateBg(storyDialogCfg.bgRes);
  285. UpdatePic(storyDialogCfg.picRes);
  286. PlayEffect(storyDialogCfg.effectInfoArr);
  287. PlayShake(storyDialogCfg.shakeInfoArr);
  288. string content = storyDialogCfg.content;
  289. content = storyDialogCfg.content.Replace("self", RoleDataManager.roleName);
  290. if (content.IndexOf("//") >= 0)
  291. {
  292. showList(content);
  293. }
  294. else
  295. {
  296. ShowDialog(storyDialogCfg);
  297. }
  298. }
  299. private void showList(string content)
  300. {
  301. StopAutoPlay();
  302. _ui.m_btnAutoPlay.enabled = false;
  303. _wordTextField = null;
  304. _ui.m_dialogText.target.visible = false;
  305. _ui.m_dialogName.target.visible = false;
  306. _ui.m_dialogHead.target.visible = false;
  307. _ui.m_list.visible = true;
  308. _ui.m_list.RemoveChildrenToPool();
  309. string[] list = Regex.Split(content, "//");
  310. _ui.m_list.itemRenderer = (int index, GObject item) =>
  311. {
  312. string itemInfo = list[index];
  313. string[] itemInfoList = Regex.Split(itemInfo, "=");
  314. UI_ListDialogItem dialogItem = UI_ListDialogItem.Proxy(item);
  315. dialogItem.m_txtContent.text = itemInfoList[0];
  316. dialogItem.target.data = itemInfoList.Length > 1 ? itemInfoList[1] : null;
  317. UI_ListDialogItem.ProxyEnd();
  318. };
  319. _ui.m_list.numItems = list.Length;
  320. }
  321. private void ShowDialog(StoryDialogCfg storyDialogCfg)
  322. {
  323. _ui.m_btnAutoPlay.enabled = true;
  324. _ui.m_list.visible = false;
  325. var content = storyDialogCfg.content.Replace("self", RoleDataManager.roleName);
  326. string words = content;
  327. string roleName = storyDialogCfg.name;
  328. string headRes = storyDialogCfg.head;
  329. string headAniRes = storyDialogCfg.headAni;
  330. if (roleName == "self")
  331. {
  332. roleName = RoleDataManager.roleName;
  333. }
  334. //回顾
  335. if (roleName != null)
  336. {
  337. _dialogListLookBack.Add("[color=#FDA2B1]" + roleName + "[/color]");
  338. }
  339. if (!string.IsNullOrEmpty(headAniRes))
  340. {
  341. var headAniCfg = HeadAniCfgArray.Instance.GetCfg(headAniRes);
  342. _ui.m_dialogText.target.visible = false;
  343. _ui.m_dialogName.target.visible = false;
  344. _ui.m_dialogHead.target.visible = true;
  345. _ui.m_dialogHead.m_txtName.text = roleName;
  346. _ui.m_dialogHead.m_comphead.m_head.visible = false;
  347. _ui.m_dialogHead.m_comphead.m_holder.visible = true;
  348. if (headAniCfg.faceId > 0)
  349. {
  350. //换装表情
  351. _ui.m_dialogHead.m_compDressUp.target.visible = true;
  352. _ui.m_dialogHead.m_comphead.target.visible = false;
  353. _dressUpObjUI.ResetSceneObj(80, true, false, null, false);
  354. _dressUpObjUI.dressUpObj.PutOnDressUpData(CustomSuitDataManager.GetCurrentSuitData().dressUpData);
  355. if (_dressUpObjUI.dressUpObj.actionId > 0)
  356. {
  357. _dressUpObjUI.dressUpObj.CancelAction(true);
  358. }
  359. _dressUpObjUI.dressUpObj.AddOrRemove(headAniCfg.faceId, false);
  360. _dressUpObjUI.UpdateWrapper(_ui.m_dialogHead.m_compDressUp.m_holder);
  361. }
  362. else
  363. {
  364. //独立动画
  365. _ui.m_dialogHead.m_compDressUp.target.visible = false;
  366. _ui.m_dialogHead.m_comphead.target.visible = true;
  367. string resPath = ResPathUtil.GetViewEffectPath("ui_nzbq", headAniCfg.headAni);
  368. SceneController.AddObjectToView(null, _npcWrapper, _ui.m_dialogHead.m_comphead.m_holder, resPath, out _npcHead, out _npcWrapper);
  369. }
  370. _wordTextField = _ui.m_dialogHead.m_txtContent;
  371. _arrow = _ui.m_dialogHead.m_iconNext;
  372. }
  373. else if (!string.IsNullOrEmpty(headRes))
  374. {
  375. _ui.m_dialogText.target.visible = false;
  376. _ui.m_dialogName.target.visible = false;
  377. _ui.m_dialogHead.target.visible = true;
  378. _ui.m_dialogHead.m_txtName.text = roleName;
  379. _ui.m_dialogHead.m_comphead.m_head.visible = true;
  380. _ui.m_dialogHead.m_comphead.m_holder.visible = false;
  381. _ui.m_dialogHead.m_comphead.m_head.url = ResPathUtil.GetNpcHeadPath(headRes);
  382. _wordTextField = _ui.m_dialogHead.m_txtContent;
  383. _arrow = _ui.m_dialogHead.m_iconNext;
  384. }
  385. else if (!string.IsNullOrEmpty(roleName))
  386. {
  387. _ui.m_dialogText.target.visible = false;
  388. _ui.m_dialogName.target.visible = true;
  389. _ui.m_dialogHead.target.visible = false;
  390. _ui.m_dialogName.m_txtName.text = roleName;
  391. _wordTextField = _ui.m_dialogName.m_txtContent;
  392. _arrow = _ui.m_dialogName.m_iconNext;
  393. }
  394. else
  395. {
  396. _ui.m_dialogText.target.visible = true;
  397. _ui.m_dialogName.target.visible = false;
  398. _ui.m_dialogHead.target.visible = false;
  399. _wordTextField = _ui.m_dialogText.m_txtContent;
  400. _arrow = _ui.m_dialogText.m_iconNext;
  401. }
  402. _wordList = Regex.Split(words, "&&");
  403. _wordIndex = 0;
  404. ShowNextDialog();
  405. }
  406. private void ShowNextDialog()
  407. {
  408. if (_wordList != null && _wordList.Length > _wordIndex)
  409. {
  410. string itemInfo = _wordList[_wordIndex];
  411. string[] itemInfoList = Regex.Split(itemInfo, "=");
  412. _currentWords = itemInfoList[0];
  413. if (itemInfoList.Length > 1)
  414. {
  415. _wordTextField.data = itemInfoList[1];
  416. }
  417. else
  418. {
  419. _wordTextField.data = null;
  420. }
  421. StartShowLetters();
  422. }
  423. else
  424. {
  425. OnStepComplete();
  426. }
  427. }
  428. private void ShowCurrentWords()
  429. {
  430. _arrow.target.visible = true;
  431. Timers.inst.Remove(UpdateLetters);
  432. _wordTextField.text = _currentWords;
  433. _dialogListLookBack.Add(_currentWords);
  434. _isShowLetters = false;
  435. _wordIndex++;
  436. if (_autoPlay)
  437. {
  438. Timers.inst.Add(GameConst.NEXT_WORDS_INTERVAL_MAX / _speedAutoPlay, 1, ShowNextWords);
  439. }
  440. }
  441. private void ShowNextWords(object param = null)
  442. {
  443. if (_wordTextField != null)
  444. {
  445. if (_isShowLetters)
  446. {
  447. ShowCurrentWords();
  448. }
  449. else
  450. {
  451. string stepID = (string)_wordTextField.data;
  452. if (stepID != null)
  453. {
  454. OnStepComplete(stepID);
  455. }
  456. else
  457. {
  458. ShowNextDialog();
  459. }
  460. }
  461. }
  462. }
  463. private void StartShowLetters()
  464. {
  465. _isShowLetters = true;
  466. _arrow.target.visible = false;
  467. _wordTextField.verticalAlign = VertAlignType.Top;
  468. _wordTextField.text = "";
  469. ArrayList letters = StoryUtil.GetLettersList(_currentWords);
  470. Timers.inst.Add(GameConst.LETTERS_INTERVAL_MAX / _speedAutoPlay, 0, UpdateLetters, letters);
  471. }
  472. private void UpdateLetters(object param)
  473. {
  474. ArrayList letters = (ArrayList)param;
  475. if (letters == null || letters.Count <= 0)
  476. {
  477. ShowCurrentWords();
  478. }
  479. else
  480. {
  481. string letter = (string)letters[0];
  482. letters.RemoveAt(0);
  483. _wordTextField.text = _wordTextField.text + letter;
  484. }
  485. }
  486. private void UpdateBg(string value)
  487. {
  488. if (value.Length > 0)
  489. {
  490. SceneController.UpdateDialogBg(value, _sceneObject);
  491. }
  492. }
  493. private void UpdatePic(string value)
  494. {
  495. if (value.Length > 0)
  496. {
  497. SceneController.UpdateDialogPic(value, _sceneObject);
  498. }
  499. }
  500. private void UpdateMusic(string value)
  501. {
  502. if (value.Length > 0)
  503. {
  504. if (value == "0")
  505. {
  506. MusicManager.Instance.Stop();
  507. }
  508. else
  509. {
  510. MusicManager.Instance.Play(ResPathUtil.GetMusicPath(value, "mp3"));
  511. }
  512. }
  513. }
  514. private void PlayEffect(string[] infos)
  515. {
  516. }
  517. private void PlayShake(int[] shakeInfoArr)
  518. {
  519. if (shakeInfoArr != null && shakeInfoArr.Length > 0)
  520. {
  521. Vector3 position = _sceneObject.transform.position;
  522. position.x = (float)shakeInfoArr[0] / GameConst.PIXELS_PER_UNITY_UNIT;
  523. position.y = (float)shakeInfoArr[1] / GameConst.PIXELS_PER_UNITY_UNIT;
  524. _sceneObject.transform.position = position;
  525. float attenuationX = (float)shakeInfoArr[2] / GameConst.PIXELS_PER_UNITY_UNIT;
  526. float attenuationY = (float)shakeInfoArr[3] / GameConst.PIXELS_PER_UNITY_UNIT;
  527. float interval = (float)shakeInfoArr[4] / 1000;
  528. float duration = (float)shakeInfoArr[5] / 1000;
  529. int repeat = Mathf.RoundToInt(duration / interval);
  530. Timers.inst.Add(interval, 0, UpdateShake, new float[] { attenuationX, attenuationY });
  531. }
  532. }
  533. private void UpdateShake(object param)
  534. {
  535. float[] attenuations = param as float[];
  536. float attenuationX = attenuations[0];
  537. float attenuationY = attenuations[1];
  538. Vector3 position = _sceneObject.transform.position;
  539. bool done = false;
  540. bool doneX = false;
  541. float absX = Mathf.Abs(position.x);
  542. if (absX > attenuationX)
  543. {
  544. int dir = (int)(position.x / absX);
  545. position.x = Mathf.Abs(position.x) - attenuationX;
  546. position.x *= -1 * dir;
  547. }
  548. else
  549. {
  550. doneX = true;
  551. position.x = 0;
  552. }
  553. bool doneY = false;
  554. float absY = Mathf.Abs(position.y);
  555. if (absY > attenuationY)
  556. {
  557. int dir = (int)(position.y / absY);
  558. position.y = Mathf.Abs(position.y) - attenuationY;
  559. position.y *= -1 * dir;
  560. }
  561. else
  562. {
  563. doneY = true;
  564. position.y = 0;
  565. }
  566. done = doneX && doneY;
  567. _sceneObject.transform.position = position;
  568. if (done)
  569. {
  570. Timers.inst.Remove(UpdateShake);
  571. }
  572. }
  573. private void Over(bool isSkip = false)
  574. {
  575. if (_onCompleteStoryDialogCall != null)
  576. {
  577. _onCompleteStoryDialogCall(isSkip, _onCompleteStoryDialogCallParam);
  578. }
  579. }
  580. private void UpdateSpeedUpBtn()
  581. {
  582. if (_speedAutoPlay > 1)
  583. {
  584. _ui.m_btnSpeedUp.text = "x" + _speedAutoPlay;
  585. }
  586. else
  587. {
  588. _ui.m_btnSpeedUp.text = "";
  589. }
  590. }
  591. private void StopAutoPlay()
  592. {
  593. _autoPlay = false;
  594. _ui.m_btnAutoPlay.selected = false;
  595. Timers.inst.Remove(ShowNextWords);
  596. }
  597. }
  598. }