1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- using System;
- using System.Collections;
- using UnityEngine;
- public class ResultWorkAPI
- {
- public void SceneStart(bool f_bIsDay, MonoBehaviour f_parent, ResultWorkAPI.dgOnSceneStartCallBack f_dgLoadedFinish)
- {
- this.m_bDay = f_bIsDay;
- this.m_dgStart = f_dgLoadedFinish;
- GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
- GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr.CloseMessageWindowPanel();
- GameMain.Instance.MainLight.Reset();
- GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
- GameMain.Instance.MainCamera.Blur(true);
- GameMain.Instance.MainCamera.SetTargetOffset(Vector3.zero, false);
- if (DailyMgr.IsLegacy)
- {
- GameMain.Instance.SoundMgr.PlayBGMLegacy("BGM015.ogg", 1f, true);
- }
- else
- {
- GameMain.Instance.SoundMgr.PlayBGM("BGM015.ogg", 1f, true);
- }
- GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.08306749f, 1.299064f, 0.0249091f), true);
- GameMain.Instance.MainCamera.SetDistance(2.2f, true);
- GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(177.9044f, 2.546583f), true);
- if (f_bIsDay)
- {
- GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
- }
- else
- {
- GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
- }
- GameMain.Instance.CharacterMgr.DeactivateCharaAll();
- f_parent.StartCoroutine(this.CoCharaLoad());
- }
- private IEnumerator CoCharaLoad()
- {
- while (GameMain.Instance.CharacterMgr.IsBusy())
- {
- yield return null;
- }
- GameMain.Instance.CharacterMgr.ResetCharaPosAll();
- GameMain.Instance.MainCamera.FadeIn(1f, false, null, true, true, default(Color));
- if (this.m_dgStart != null)
- {
- this.m_dgStart();
- }
- yield break;
- }
- public void EndNextScene(ResultWorkAPI.dgOnSceneFinalCallBack f_dgEnd)
- {
- this.m_dgFinal = f_dgEnd;
- if (GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") != 3)
- {
- GameMain.Instance.SoundMgr.StopBGM(1f);
- }
- GameMain.Instance.MainCamera.FadeOut(1f, false, new CameraMain.dgOnCompleteFade(this.OnFinishFadeOut), true, default(Color));
- }
- private void OnFinishFadeOut()
- {
- GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
- if (this.m_dgFinal != null)
- {
- this.m_dgFinal();
- }
- }
- public void SceneFinish()
- {
- if (GameMain.Instance.MainCamera != null)
- {
- GameMain.Instance.MainCamera.SetTargetOffset(Vector3.zero, false);
- }
- if (GameMain.Instance.CharacterMgr != null)
- {
- GameMain.Instance.CharacterMgr.DeactivateCharaAll();
- }
- }
- private ResultWorkAPI.dgOnSceneStartCallBack m_dgStart;
- private ResultWorkAPI.dgOnSceneFinalCallBack m_dgFinal;
- private bool m_bDay = true;
- public delegate void dgOnSceneStartCallBack();
- public delegate void dgOnSceneFinalCallBack();
- }
|