ResultIncomeAPI.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using System.Collections;
  3. using UnityEngine;
  4. public class ResultIncomeAPI
  5. {
  6. public void SceneStart(MonoBehaviour f_parent, ResultIncomeAPI.dgOnSceneStartCallBack f_dgLoadedFinish)
  7. {
  8. this.m_dgStart = f_dgLoadedFinish;
  9. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  10. GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr.CloseMessageWindowPanel();
  11. GameMain.Instance.MainLight.Reset();
  12. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  13. GameMain.Instance.MainCamera.Blur(true);
  14. GameMain.Instance.MainCamera.SetTargetOffset(Vector3.zero, false);
  15. if (DailyMgr.IsLegacy)
  16. {
  17. GameMain.Instance.SoundMgr.PlayBGMLegacy("BGM015.ogg", 1f, true);
  18. }
  19. else
  20. {
  21. GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 1f, true);
  22. }
  23. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.08306749f, 1.299064f, 0.0249091f), true);
  24. GameMain.Instance.MainCamera.SetDistance(2.2f, true);
  25. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(177.9044f, 2.546583f), true);
  26. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_Night");
  27. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  28. f_parent.StartCoroutine(this.CoCharaLoad());
  29. }
  30. private IEnumerator CoCharaLoad()
  31. {
  32. while (GameMain.Instance.CharacterMgr.IsBusy())
  33. {
  34. yield return null;
  35. }
  36. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  37. GameMain.Instance.MainCamera.FadeIn(1f, false, null, true, true, default(Color));
  38. if (this.m_dgStart != null)
  39. {
  40. this.m_dgStart();
  41. }
  42. yield break;
  43. }
  44. public void EndNextScene(ResultIncomeAPI.dgOnSceneFinalCallBack f_dgEnd)
  45. {
  46. this.m_dgFinal = f_dgEnd;
  47. GameMain.Instance.SoundMgr.StopBGM(1f);
  48. GameMain.Instance.MainCamera.FadeOut(1f, false, new CameraMain.dgOnCompleteFade(this.OnFinishFadeOut), true, default(Color));
  49. }
  50. private void OnFinishFadeOut()
  51. {
  52. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  53. if (this.m_dgFinal != null)
  54. {
  55. this.m_dgFinal();
  56. }
  57. }
  58. public void SceneFinish()
  59. {
  60. if (GameMain.Instance.MainCamera != null)
  61. {
  62. GameMain.Instance.MainCamera.SetTargetOffset(Vector3.zero, false);
  63. }
  64. if (GameMain.Instance.CharacterMgr != null)
  65. {
  66. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  67. }
  68. }
  69. private ResultIncomeAPI.dgOnSceneStartCallBack m_dgStart;
  70. private ResultIncomeAPI.dgOnSceneFinalCallBack m_dgFinal;
  71. public delegate void dgOnSceneStartCallBack();
  72. public delegate void dgOnSceneFinalCallBack();
  73. }