StoryE21.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. using System;
  2. using System.Collections;
  3. using Colorful;
  4. using DG.Tweening;
  5. using ExtensionMethods;
  6. using GameWorld;
  7. using I2.Loc;
  8. using UnityEngine;
  9. using UnityStandardAssets.ImageEffects;
  10. public class StoryE21 : BaseBehaviour
  11. {
  12. private bool e21Finish
  13. {
  14. set
  15. {
  16. SaveStorage.Set("E21_Finish", value);
  17. }
  18. }
  19. private void Start()
  20. {
  21. this.spwanEnemy = true;
  22. base.StartCoroutine(this.P1Coroutine());
  23. }
  24. private void Update()
  25. {
  26. R.Player.Attribute.currentHP = R.Player.Attribute.maxHP;
  27. }
  28. private void OnEnable()
  29. {
  30. EventManager.RegisterEvent<EnemyHurtAtkEventArgs>("EnemyHurtAtk", new EventManager.FBEventHandler<EnemyHurtAtkEventArgs>(this.EnemyHurt), EventManager.ListenerQueue.Game);
  31. EventManager.RegisterEvent<EventArgs>("EnemyKilled", new EventManager.FBEventHandler<EventArgs>(this.EnemyDie), EventManager.ListenerQueue.Game);
  32. }
  33. private bool EnemyDie(string eventDefine, object sender, EventArgs msg)
  34. {
  35. EnemyAttribute e = sender as EnemyAttribute;
  36. base.StartCoroutine(this.SpwanEnemy(e));
  37. return true;
  38. }
  39. private void OnDisable()
  40. {
  41. EventManager.UnregisterEvent<EnemyHurtAtkEventArgs>("EnemyHurtAtk", new EventManager.FBEventHandler<EnemyHurtAtkEventArgs>(this.EnemyHurt), EventManager.ListenerQueue.Game);
  42. EventManager.UnregisterEvent<EventArgs>("EnemyKilled", new EventManager.FBEventHandler<EventArgs>(this.EnemyDie), EventManager.ListenerQueue.Game);
  43. }
  44. private bool EnemyHurt(string eventDefine, object sender, EnemyHurtAtkEventArgs msg)
  45. {
  46. this.hitEnemy = true;
  47. return true;
  48. }
  49. private YieldInstruction ShowTextWithContent(TextMesh text, string content, float time)
  50. {
  51. if (text.text != content)
  52. {
  53. text.text = content;
  54. }
  55. return DOTween.To(delegate(float a)
  56. {
  57. text.color = text.color.SetAlpha(a);
  58. }, 0f, 1f, time).WaitForCompletion();
  59. }
  60. private YieldInstruction HideText(TextMesh text, float time = 1f)
  61. {
  62. return DOTween.To(delegate(float a)
  63. {
  64. text.color = text.color.SetAlpha(a);
  65. }, 1f, 0f, 1f).WaitForCompletion();
  66. }
  67. private void TextShine(bool start, string content = "")
  68. {
  69. this.text.text = content;
  70. this._startShine = start;
  71. if (start)
  72. {
  73. base.StartCoroutine(this.StartShineCoroutine());
  74. }
  75. }
  76. private IEnumerator StartShineCoroutine()
  77. {
  78. while (this._startShine)
  79. {
  80. yield return DOTween.To(delegate(float a)
  81. {
  82. this.text.color = this.text.color.SetAlpha(a);
  83. }, 1f, 0f, 1f).WaitForCompletion();
  84. }
  85. yield break;
  86. }
  87. private IEnumerator P1Coroutine()
  88. {
  89. yield return R.Ui.HideUI(false);
  90. yield return this.ShowTextWithContent(this.text, ScriptLocalization.Story.e21s1, 1f);
  91. yield return R.Audio.PlayVoiceOver("e21t1", null, false);
  92. CameraFilterUtils.Create<CameraFilterPack_TV_Chromatical>(null);
  93. R.Camera.Controller.CameraShake(1f, 0.2f, CameraController.ShakeTypeEnum.Rect, false);
  94. yield return this.HideText(this.text, 1f);
  95. CameraFilterUtils.Remove<CameraFilterPack_TV_Chromatical>(null);
  96. YieldInstruction t3 = R.Audio.PlayVoiceOver("e21t3", null, false);
  97. yield return DOTween.To(() => this.black.color, delegate(Color color)
  98. {
  99. this.black.color = color;
  100. }, Color.black, 1f).WaitForCompletion();
  101. yield return t3;
  102. CameraFilterUtils.Create<CameraFilterPack_Color_GrayScale>(null);
  103. R.Camera.Controller.CameraShake(1f, 0.2f, CameraController.ShakeTypeEnum.Rect, false);
  104. yield return this.ShowTextWithContent(this.text, ScriptLocalization.Story.e21s29, 1f);
  105. yield return R.Audio.PlayVoiceOver("e21t4", null, false);
  106. yield return this.ShowTextWithContent(this.text, ScriptLocalization.Story.e21s2, 1f);
  107. yield return R.Audio.PlayVoiceOver("e21t5", null, false);
  108. YieldInstruction t4 = R.Audio.PlayVoiceOver("e21t6", null, false);
  109. yield return this.ShowTextWithContent(this.text, ScriptLocalization.Story.e21s3, 1f);
  110. yield return t4;
  111. YieldInstruction t5 = R.Audio.PlayVoiceOver("e21t7", null, false);
  112. yield return this.HideText(this.text, 1f);
  113. yield return t5;
  114. string userName = R.Player.UserName;
  115. if (string.IsNullOrEmpty(userName))
  116. {
  117. userName = ScriptLocalization.ui.anonymous;
  118. }
  119. yield return R.Ui.Terminal.OpenWithAnim(new Color?(Color.white));
  120. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s4, 0.1f);
  121. yield return R.Ui.Terminal.ShowProgressBar(0f);
  122. yield return R.Ui.Terminal.SetProgressBarValueWithAnim(0.99f, 3f);
  123. yield return R.Audio.PlayVoiceOver("e21t8", null, false);
  124. R.Ui.CameraGO.transform.DOShakePosition(1f, 0.1f, 10, 90f, false, true);
  125. yield return R.Ui.Terminal.SetProgressBarValueWithAnim(0f, 2f);
  126. yield return R.Ui.Terminal.HideProgressBar();
  127. if (UILanguage.IsSimplifiedChinese)
  128. {
  129. yield return R.Ui.Terminal.ShowTexture(this.invaded_cn, 1f, 1f);
  130. }
  131. else if (UILanguage.IsTraditionalChinese)
  132. {
  133. yield return R.Ui.Terminal.ShowTexture(this.invaded_cn_tw, 1f, 1f);
  134. }
  135. else
  136. {
  137. yield return R.Ui.Terminal.ShowTexture(this.invaded, 1f, 1f);
  138. }
  139. YieldInstruction t6 = R.Audio.PlayVoiceOver("e21t9", null, false);
  140. yield return R.Ui.Terminal.Println(string.Format("{0}{1}[-]", Color.red.ToBBCode(), ScriptLocalization.Story.e21s6), 0.1f);
  141. yield return R.Ui.Terminal.ShowProgressBar(0f);
  142. yield return R.Ui.Terminal.SetProgressBarValueWithAnim(1f, 3f);
  143. yield return t6;
  144. AnalogTV analoyTv = R.Ui.CameraGO.GetComponent<AnalogTV>();
  145. float originScale = analoyTv.Scale;
  146. for (int i = 0; i < 30; i++)
  147. {
  148. analoyTv.Scale += ((float)(i % 2) - 0.5f) * 2f * 0.1f;
  149. yield return null;
  150. yield return null;
  151. }
  152. analoyTv.Scale = originScale;
  153. R.Ui.Terminal.transform.DOShakePosition(1f, 0.1f, 10, 90f, false, true);
  154. yield return R.Audio.PlayVoiceOver("e21t10", null, false);
  155. yield return R.Ui.Terminal.Println(string.Format("{0}{1}[-]", Color.red.ToBBCode(), ScriptLocalization.Story.e21s7), 0.1f);
  156. yield return new WaitForSeconds(1f);
  157. this.HideText(this.text, 1f);
  158. yield return R.Ui.Terminal.HideTexture();
  159. yield return R.Ui.Terminal.HideProgressBar();
  160. yield return R.Ui.Terminal.CloseWithAnim();
  161. YieldInstruction t7 = R.Audio.PlayVoiceOver("e21t11", null, false);
  162. yield return new WaitForSeconds(3f);
  163. yield return this.ShowTextWithContent(this.text, userName, 1f);
  164. yield return new WaitForSeconds(1f);
  165. yield return this.HideText(this.text, 1f);
  166. yield return t7;
  167. YieldInstruction t8 = R.Audio.PlayVoiceOver("e21t12", null, false);
  168. this.text.transform.localScale = new Vector3(100f, 100f, 1f);
  169. this.text.text = ScriptLocalization.Story.e21s8;
  170. this.text.color = Color.white;
  171. R.Audio.PlayEffect(360, new Vector3?(this.text.transform.position));
  172. yield return DOTween.To(() => this.text.transform.localScale, delegate(Vector3 scale)
  173. {
  174. this.text.transform.localScale = scale;
  175. }, Vector3.one, 0.2f).WaitForCompletion();
  176. yield return new WaitForSeconds(2f);
  177. yield return this.ShowTextWithContent(this.text, ScriptLocalization.Story.e21s9, 1f);
  178. yield return new WaitForSeconds(2f);
  179. yield return t8;
  180. yield return R.Audio.PlayVoiceOver("e21t13", null, false);
  181. yield return this.ShowTextWithContent(this.text, ScriptLocalization.Story.e21s10, 1f);
  182. yield return new WaitForSeconds(2f);
  183. this.text.text = string.Empty;
  184. this.animator.gameObject.SetActive(true);
  185. this.animator.Play("ControllerIdle");
  186. this.animation.gameObject.SetActive(true);
  187. R.Audio.PlayEffect(145, new Vector3?(this.text.transform.position));
  188. yield return R.Audio.PlayVoiceOver("e21t14", null, false);
  189. yield return R.Audio.PlayVoiceOver("e21t15", null, false);
  190. this.animator.gameObject.SetActive(false);
  191. this.text.text = ScriptLocalization.Story.e21s30;
  192. R.Audio.PlayEffect(145, new Vector3?(this.text.transform.position));
  193. yield return R.Audio.PlayVoiceOver("e21t16", null, false);
  194. this.lgate.Appear();
  195. this.rgate.Appear();
  196. GameArea.EnemyRange.xMin = this.lgate.transform.Find("PlayerLimitPosLX").transform.position.x;
  197. GameArea.EnemyRange.xMax = this.rgate.transform.Find("PlayerLimitPosRX").transform.position.x;
  198. GameArea.CameraRange.xMin = this.lgate.transform.Find("CameraLimitPosLX").transform.position.x;
  199. GameArea.CameraRange.xMax = this.rgate.transform.Find("CameraLimitPosRX").transform.position.x;
  200. R.SceneData.CanAIRun = true;
  201. for (int j = 0; j < 5; j++)
  202. {
  203. float xPos = Mathf.Clamp(R.Player.Transform.position.x + UnityEngine.Random.Range(-6f, 6f), GameArea.EnemyRange.xMin, GameArea.EnemyRange.xMax);
  204. Singleton<EnemyGenerator>.Instance.GenerateEnemy(this.enemy[j % this.enemy.Length], new Vector2?(new Vector2(xPos, R.Player.Transform.position.y)), true, true);
  205. yield return null;
  206. }
  207. float t9 = 0f;
  208. bool time20 = false;
  209. bool time21 = false;
  210. bool time22 = false;
  211. while (!this.hitEnemy)
  212. {
  213. t9 += Time.deltaTime;
  214. if (t9 > 60f && !time22)
  215. {
  216. time22 = true;
  217. R.Audio.PlayVoiceOver("e21t39", null, false);
  218. }
  219. if (t9 > 40f && !time21)
  220. {
  221. time21 = true;
  222. R.Audio.PlayVoiceOver("e21t38", null, false);
  223. }
  224. if (t9 > 20f && !time20)
  225. {
  226. time20 = true;
  227. R.Audio.PlayVoiceOver("e21t37", null, false);
  228. }
  229. yield return null;
  230. }
  231. base.StartCoroutine(this.P2Coroutine());
  232. yield break;
  233. }
  234. private IEnumerator P2Coroutine()
  235. {
  236. R.Audio.PlayBGM(262, true);
  237. yield return R.Audio.PlayVoiceOver("e21t17", null, false);
  238. yield return new WaitForSeconds(15f);
  239. this.animation.gameObject.SetActive(false);
  240. this.text.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 180f));
  241. this.text.text = ScriptLocalization.Story.e21s11;
  242. Camera.main.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, 180f));
  243. yield return R.Audio.PlayVoiceOver("e21t18", null, false);
  244. yield return new WaitForSeconds(15f);
  245. this.text.text = string.Empty;
  246. this.text.transform.rotation = Quaternion.identity;
  247. Camera.main.transform.rotation = Quaternion.identity;
  248. CameraFilterUtils.Create<CameraFilterPack_TV_Videoflip>(null);
  249. yield return R.Audio.PlayVoiceOver("e21t19", null, false);
  250. yield return new WaitForSeconds(15f);
  251. CameraFilterUtils.Remove<CameraFilterPack_TV_Videoflip>(null);
  252. YieldInstruction t20 = R.Audio.PlayVoiceOver("e21t20", null, false);
  253. this.animator.gameObject.SetActive(true);
  254. this.animator.Play("ControllerRSpark");
  255. for (int i = 0; i < 5; i++)
  256. {
  257. yield return new WaitForSeconds(2f);
  258. InputSetting.Stop(false);
  259. yield return new WaitForSeconds(1f);
  260. InputSetting.Resume(false);
  261. }
  262. yield return R.Audio.PlayVoiceOver("e21t21", null, false);
  263. InputSetting.Stop(false);
  264. this.animator.Play("ControllerNoUse");
  265. R.Ui.uiNotifacation.FadeIn(ScriptLocalization.Story.e21s12);
  266. yield return R.Audio.PlayVoiceOver("e21t22", null, false);
  267. if (!R.Player.Action.stateMachine.currentState.IsInArray(PlayerAction.NormalSta))
  268. {
  269. R.Player.ActionController.ChangeState(PlayerAction.StateEnum.Idle);
  270. }
  271. this.spwanEnemy = false;
  272. foreach (EnemyAttribute enemyAttribute in R.Enemy.EnemyAttributes)
  273. {
  274. enemyAttribute.currentHp = 0;
  275. }
  276. R.Audio.StopBGM(true);
  277. yield return R.Audio.PlayVoiceOver("e21t23", null, false);
  278. CameraFilterUtils.Remove<CameraFilterPack_Color_GrayScale>(null);
  279. yield return new WaitForSeconds(2f);
  280. yield return R.Audio.PlayVoiceOver("e21t24", null, false);
  281. int dir = InputSetting.JudgeDir(R.Player.Transform.position, this.stopPos.position);
  282. R.Player.ActionController.TurnRound(dir);
  283. R.Player.ActionController.StartMove();
  284. while (Vector3.Distance(R.Player.Transform.position, this.stopPos.position) > 0.5f)
  285. {
  286. yield return null;
  287. }
  288. R.Player.ActionController.StopMove();
  289. R.SceneData.CanAIRun = false;
  290. CameraFilterPack_Pixel_Pixelisation pixelisation = CameraFilterUtils.Create<CameraFilterPack_Pixel_Pixelisation>(null);
  291. pixelisation._Pixelisation = 2f;
  292. pixelisation._SizeX = 2.25f;
  293. pixelisation._SizeY = 4f;
  294. yield return R.Audio.PlayVoiceOver("e21t25", null, false);
  295. for (int j = 0; j < 5; j++)
  296. {
  297. float xPos = Mathf.Clamp(R.Player.Transform.position.x + UnityEngine.Random.Range(-6f, 6f), GameArea.EnemyRange.xMin, GameArea.EnemyRange.xMax);
  298. Singleton<EnemyGenerator>.Instance.GenerateEnemy(this.enemy[j % this.enemy.Length], new Vector2?(new Vector2(xPos, R.Player.Transform.position.y)), true, true);
  299. yield return null;
  300. }
  301. yield return R.Audio.PlayVoiceOver("e21t26", null, false);
  302. CameraFilterUtils.Remove<CameraFilterPack_Pixel_Pixelisation>(null);
  303. YieldInstruction t21 = R.Audio.PlayVoiceOver("e21t27", null, false);
  304. yield return R.Player.Transform.DOShakePosition(1f, Vector3.right * 0.1f, 10, 90f, false, true).WaitForCompletion();
  305. yield return t21;
  306. YieldInstruction t22 = R.Audio.PlayVoiceOver("e21t28", null, false);
  307. yield return R.Player.Transform.DOShakePosition(1f, Vector3.right * 0.2f, 10, 90f, false, true).WaitForCompletion();
  308. yield return t22;
  309. YieldInstruction t23 = R.Audio.PlayVoiceOver("e21t29", null, false);
  310. yield return R.Player.Transform.DOShakePosition(1f, Vector3.right * 0.3f, 10, 90f, false, true).WaitForCompletion();
  311. yield return t23;
  312. foreach (EnemyAttribute enemyAttribute2 in R.Enemy.EnemyAttributes)
  313. {
  314. enemyAttribute2.currentHp = 1;
  315. }
  316. R.Player.Transform.GetComponent<Claymore>().StartCharge(false);
  317. yield return new WaitForSeconds(4.2f);
  318. R.Player.Transform.GetComponent<Claymore>().ReleaseCharge(false);
  319. yield return new WaitForSeconds(0.2f);
  320. this.tv_Main.sprite = this.tv_M;
  321. this.tv_Left.sprite = this.tv_L;
  322. this.tv_Right.sprite = this.tv_R;
  323. R.Audio.PlayEffect(368, new Vector3?(this.text.transform.position));
  324. yield return R.Audio.PlayVoiceOver("e21t30", null, false);
  325. UnityEngine.Object.Destroy(this.animator.gameObject);
  326. this.lgate.DisAppear();
  327. this.rgate.DisAppear();
  328. yield return new WaitForSeconds(3f);
  329. R.Audio.StopBGM(true);
  330. R.Audio.PlayBGM(479, false);
  331. yield return new WaitForSeconds(2f);
  332. yield return R.Audio.PlayVoiceOver("e21t31", null, false);
  333. yield return R.Audio.PlayVoiceOver("e21t32", null, false);
  334. yield return R.Ui.Volume.Show(1f);
  335. yield return new WaitForSeconds(0.5f);
  336. R.Player.Transform.GetComponent<Claymore>().StartCharge(false);
  337. yield return new WaitForSeconds(1f);
  338. YieldInstruction t24 = R.Audio.PlayVoiceOver("e21t33", null, false);
  339. R.Player.Transform.GetComponent<Claymore>().ReleaseCharge(false);
  340. yield return R.Ui.Volume.BarAnim(0f, 0.2f);
  341. yield return R.Ui.Volume.Hide();
  342. yield return t24;
  343. CameraFilterUtils.Create<CameraFilterPack_TV_ARCADE_2>(null);
  344. yield return R.Ui.uiNotifacation.FadeOut(0f, 1f);
  345. SunShafts sun = Camera.main.gameObject.AddComponent<SunShafts>();
  346. sun.sunThreshold = Color.black;
  347. sun.sunShaftBlurRadius = 10f;
  348. sun.sunShaftsShader = Shader.Find("Hidden/SunShaftsComposite");
  349. sun.simpleClearShader = Shader.Find("Hidden/SimpleClear");
  350. R.Mode.EnterMode(Mode.AllMode.Story);
  351. DOTween.To(() => sun.sunShaftIntensity, delegate(float intensity)
  352. {
  353. sun.sunShaftIntensity = intensity;
  354. }, 2f, 5f);
  355. YieldInstruction t25 = R.Audio.PlayVoiceOver("e21t34", null, false);
  356. R.Camera.Controller.EnableGlobalBloom();
  357. R.Camera.Controller.CameraZoom(R.Player.Transform.position + Vector3.up, 5f, 4f);
  358. R.Ui.Toast.Show(ScriptLocalization.Story.e21s13, 1f, true);
  359. yield return new WaitForSeconds(1.2f);
  360. R.Ui.Toast.Show(ScriptLocalization.Story.e21s14, 1f, true);
  361. yield return new WaitForSeconds(1.2f);
  362. yield return t25;
  363. YieldInstruction t26 = R.Audio.PlayVoiceOver("e21t35", null, false);
  364. R.Player.RoleName = R.Player.UserName;
  365. if (string.IsNullOrEmpty(R.Player.RoleName))
  366. {
  367. R.Player.RoleName = "anonymous";
  368. }
  369. yield return DOTween.To(() => sun.sunShaftIntensity, delegate(float intensity)
  370. {
  371. sun.sunShaftIntensity = intensity;
  372. }, 10f, 5f).WaitForCompletion();
  373. yield return t26;
  374. YieldInstruction t27 = R.Audio.PlayVoiceOver("e21t36", null, false);
  375. CameraFilterUtils.Remove<CameraFilterPack_TV_ARCADE_2>(null);
  376. R.Trophy.AwardTrophy(22);
  377. R.Ui.Toast.Show(ScriptLocalization.Story.e21s15, 5f, true);
  378. yield return new WaitForSeconds(5f);
  379. yield return t27;
  380. SingletonMono<MobileInputPlayer>.Instance.MainControllerVisiable = false;
  381. yield return R.Ui.EndTitle.Show(true);
  382. yield return DOTween.To(() => this.windyBlack.color, delegate(Color color)
  383. {
  384. this.windyBlack.color = color;
  385. }, Color.white, 3f).WaitForCompletion();
  386. yield return DOTween.To(() => this.windy.color, delegate(Color color)
  387. {
  388. this.windy.color = color;
  389. }, Color.white, 5f).WaitForCompletion();
  390. yield return new WaitForSeconds(1f);
  391. this.windy.gameObject.SetActive(false);
  392. yield return R.Ui.Terminal.OpenWithAnim(new Color?(Color.white));
  393. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s16, 0.1f);
  394. yield return R.Ui.Terminal.ShowProgressBar(0f);
  395. yield return R.Ui.Terminal.SetProgressBarValueWithAnim(1f, 3f);
  396. yield return new WaitForSeconds(3f);
  397. yield return R.Ui.Terminal.HideProgressBar();
  398. string icey = Color.green.ToBBCode();
  399. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s17, 0.1f);
  400. yield return new WaitForSeconds(2f);
  401. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s18, 0.1f);
  402. yield return new WaitForSeconds(2f);
  403. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s19, 0.1f);
  404. yield return new WaitForSeconds(2f);
  405. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s20, 0.1f);
  406. yield return new WaitForSeconds(2f);
  407. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s21, 0.1f);
  408. yield return new WaitForSeconds(1f);
  409. yield return R.Ui.Terminal.PrintlnInstantly(ScriptLocalization.Story.e21s22);
  410. yield return new WaitForSeconds(1f);
  411. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s23, 0.1f);
  412. yield return new WaitForSeconds(1f);
  413. yield return R.Ui.Terminal.PrintlnInstantly(ScriptLocalization.Story.e21s24);
  414. yield return new WaitForSeconds(5f);
  415. yield return R.Ui.Terminal.PrintlnInstantly(ScriptLocalization.Story.e21s25);
  416. yield return R.Ui.Terminal.Println(string.Format("\n{0}{1}[-]", icey, ScriptLocalization.Story.e21s26), 0.1f);
  417. yield return new WaitForSeconds(1f);
  418. yield return R.Ui.Terminal.PrintlnInstantly(ScriptLocalization.Story.e21s27);
  419. yield return new WaitForSeconds(2f);
  420. R.Ui.Terminal.Clear();
  421. yield return R.Ui.Terminal.Println(ScriptLocalization.Story.e21s28, 0.2f);
  422. yield return new WaitForSeconds(3f);
  423. yield return R.Ui.Terminal.CloseWithAnim();
  424. R.Ui.BlackScene.Alpha = 1f;
  425. UnityEngine.Object.Destroy(Camera.main.GetComponent<SunShafts>());
  426. this.e21Finish = true;
  427. yield return new WaitForSeconds(1f);
  428. InputSetting.Resume(false);
  429. R.Ui.BlackScene.Alpha = 0f;
  430. R.Mode.EnterMode(Mode.AllMode.Story);
  431. yield return R.Ui.LevelSelect.OpenWithAnim(true, true);
  432. yield break;
  433. }
  434. private IEnumerator SpwanEnemy(EnemyAttribute e)
  435. {
  436. yield return new WaitForSeconds(UnityEngine.Random.Range(2f, 3f));
  437. if (this.spwanEnemy)
  438. {
  439. Singleton<EnemyGenerator>.Instance.GenerateEnemy(e.baseData.enemyType, new Vector2?(R.Player.Transform.position + new Vector3(UnityEngine.Random.Range(-3f, 3f), 0f, 0f)), true, true);
  440. }
  441. yield break;
  442. }
  443. private void OnDestroy()
  444. {
  445. if (!SingletonMono<CameraController>.ApplicationIsQuitting)
  446. {
  447. Camera.main.transform.rotation = Quaternion.identity;
  448. CameraFilterUtils.Remove<CameraFilterPack_TV_Chromatical>(null);
  449. CameraFilterUtils.Remove<CameraFilterPack_Color_GrayScale>(null);
  450. CameraFilterUtils.Remove<CameraFilterPack_TV_Videoflip>(null);
  451. CameraFilterUtils.Remove<CameraFilterPack_Pixel_Pixelisation>(null);
  452. CameraFilterUtils.Remove<CameraFilterPack_TV_ARCADE_2>(null);
  453. UnityEngine.Object.Destroy(Camera.main.GetComponent<SunShafts>());
  454. SingletonMono<MobileInputPlayer>.Instance.MainControllerVisiable = true;
  455. }
  456. }
  457. [SerializeField]
  458. private TextMesh text;
  459. [SerializeField]
  460. private SpriteRenderer black;
  461. [SerializeField]
  462. private EnemyType[] enemy;
  463. [SerializeField]
  464. private Transform stopPos;
  465. private bool _startShine;
  466. private bool spwanEnemy;
  467. private bool hitEnemy;
  468. [SerializeField]
  469. private BattleZoneGate lgate;
  470. [SerializeField]
  471. private BattleZoneGate rgate;
  472. [SerializeField]
  473. private SpriteRenderer windy;
  474. [SerializeField]
  475. private SpriteRenderer windyBlack;
  476. [SerializeField]
  477. private Texture invaded;
  478. [SerializeField]
  479. private Texture invaded_cn;
  480. [SerializeField]
  481. private Texture invaded_cn_tw;
  482. [SerializeField]
  483. private Animator animator;
  484. [SerializeField]
  485. private Animation animation;
  486. [SerializeField]
  487. private SpriteRenderer tv_Main;
  488. [SerializeField]
  489. private SpriteRenderer tv_Left;
  490. [SerializeField]
  491. private SpriteRenderer tv_Right;
  492. [SerializeField]
  493. private Sprite tv_M;
  494. [SerializeField]
  495. private Sprite tv_L;
  496. [SerializeField]
  497. private Sprite tv_R;
  498. }