123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- using System;
- using System.IO;
- using UnityEngine;
- public class FreeModeInit : WfScreenChildren
- {
- public override void Awake()
- {
- base.Awake();
- base.SetFadeTime(0f);
- }
- protected override void OnCall()
- {
- this.mgr_ = (base.parent_mgr as SceneFreeModeSelectManager);
- NDebug.AssertNull(this.mgr_ != null);
- GameMain.Instance.ScriptMgr.ClearForcExecWaitEvent();
- GameMain.Instance.MsgWnd.CloseMessageWindowPanel();
- GameMain.Instance.MsgWnd.CancelSkipAndAuto();
- GameMain.Instance.BgMgr.DelPrefabFromBgAll();
- if (DailyMgr.IsLegacy)
- {
- GameMain.Instance.BgMgr.ChangeBg("Salon");
- }
- else
- {
- GameMain.Instance.BgMgr.ChangeBg("Theater");
- }
- GameMain.Instance.MainLight.Reset();
- GameMain.Instance.CharacterMgr.ResetCharaPosAll();
- GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
- GameMain.Instance.SoundMgr.StopSe();
- GameMain.Instance.SoundMgr.VoiceStopAll();
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid man = characterMgr.GetMan(0);
- man.Visible = true;
- Maid maid = characterMgr.GetMaid(0);
- maid.Visible = true;
- string[] array = new string[]
- {
- "handitem",
- "kousoku_upper",
- "kousoku_lower",
- "skirt",
- "panz",
- "mizugi",
- "onepiece",
- "accanl",
- "accvag",
- "KubiScl",
- "UdeScl",
- "DouPer",
- "sintyou",
- "kata"
- };
- for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = characterMgr.GetStockMaid(i);
- if (!(stockMaid == null))
- {
- stockMaid.ResetAll();
- }
- }
- for (int j = 0; j < characterMgr.GetStockManCount(); j++)
- {
- Maid stockMan = characterMgr.GetStockMan(j);
- if (!(stockMan == null))
- {
- stockMan.ResetAll();
- }
- }
- for (int k = 1; k < characterMgr.GetMaidCount(); k++)
- {
- characterMgr.DeactivateMaid(k);
- }
- if (maid != null)
- {
- string bgmFileName = maid.status.personal.bgmFileName;
- if (!string.IsNullOrEmpty(bgmFileName))
- {
- if (maid.status.isCompatiblePersonality)
- {
- GameMain.Instance.SoundMgr.PlayBGMLegacy(bgmFileName, 0.5f, true);
- }
- else
- {
- string text = (!maid.status.personal.oldPersonal) ? string.Empty : (Path.GetFileNameWithoutExtension(bgmFileName) + "_OLD.ogg");
- if (!string.IsNullOrEmpty(text) && GameUty.FileSystem.IsExistentFile(text))
- {
- GameMain.Instance.SoundMgr.PlayBGM(text, 0.5f, true);
- }
- else
- {
- GameMain.Instance.SoundMgr.PlayBGM(bgmFileName, 0.5f, true);
- }
- }
- }
- maid.Visible = false;
- maid.Visible = true;
- maid.FaceAnime("通常", 0f, 0);
- maid.FaceAnime("通常", 0.01f, 0);
- maid.FaceBlend("無し");
- maid.AllProcPropSeqStart();
- }
- man.AllProcPropSeqStart();
- GameMain.Instance.SysShortcut.strSceneHelpName = "SceneFreeModeSelect";
- uGUITutorialPanel.OpenTutorial("SceneFreeModeSelect", null, false);
- }
- protected override bool IsCallFadeIn()
- {
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- bool flag = !characterMgr.IsBusy();
- if (!flag)
- {
- return false;
- }
- if (DailyMgr.IsLegacy)
- {
- YotogiOld.CreateData();
- if (!YotogiOldSkillSelectWaitMotion.ApplyMaidGesture(characterMgr.GetMaid(0), YotogiOld.Stage.サロン))
- {
- return false;
- }
- }
- else if (!YotogiSkillSelectWaitMotion.ApplyMaidGesture(characterMgr.GetMaid(0), YotogiStage.GetAllDatas(true)[0]))
- {
- return false;
- }
- GameMain.Instance.MainCamera.SetTargetOffset(new Vector3((float)Screen.width / 256f * 208f - (float)Screen.width / 2f, 0f, 0f), false);
- for (int i = 0; i < characterMgr.GetManCount(); i++)
- {
- Maid man = characterMgr.GetMan(i);
- if (man != null && man.Visible)
- {
- man.Visible = false;
- }
- }
- return flag;
- }
- protected override void FadeIn()
- {
- base.FadeIn();
- if (base.fade_status == WfScreenChildren.FadeStatus.Wait)
- {
- this.Finish();
- }
- }
- public override void Update()
- {
- base.Update();
- if (base.fade_status == WfScreenChildren.FadeStatus.Wait)
- {
- this.Finish();
- }
- }
- protected override void OnFinish()
- {
- base.OnFinish();
- this.mgr_.CallScreen(this.next_screen);
- }
- public string next_screen { get; set; }
- private SceneFreeModeSelectManager mgr_;
- }
|