123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- using System;
- using System.Collections.Generic;
- using Schedule;
- using UnityEngine;
- public class SceneCharacterSelect : WfScreenManager
- {
- public static void CreateYotogiCharaList()
- {
- SceneCharacterSelect.chara_guid_stock_list.Clear();
- List<Maid> yotogiMaids = ScheduleAPI.GetYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
- for (int i = 0; i < yotogiMaids.Count; i++)
- {
- SceneCharacterSelect.chara_guid_stock_list.Add(yotogiMaids[i].status.guid);
- }
- }
- public static void CreateNewYotogiCharaList()
- {
- SceneCharacterSelect.chara_guid_stock_list.Clear();
- List<Maid> newYotogiMaids = ScheduleAPI.GetNewYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
- for (int i = 0; i < newYotogiMaids.Count; i++)
- {
- SceneCharacterSelect.chara_guid_stock_list.Add(newYotogiMaids[i].status.guid);
- }
- }
- public static void CreateNewYotogiHaremPairCharaList()
- {
- SceneCharacterSelect.chara_guid_stock_list.Clear();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
- if (maid == null)
- {
- return;
- }
- for (int i = 0; i < 40; i++)
- {
- if (!(maid != GameMain.Instance.CharacterMgr.status.GetScheduleSlot(i)))
- {
- int num = (!GameMain.Instance.CharacterMgr.status.isDaytime) ? maid.status.nightWorkId : maid.status.noonWorkId;
- if (!ScheduleCSVData.AllData.ContainsKey(num))
- {
- Debug.LogError("ScheduleAPI:タスクID[" + num + "]のデータが見つかりませんでした");
- }
- ScheduleCSVData.ScheduleBase scheduleBase = ScheduleCSVData.AllData[num];
- if (scheduleBase.type == ScheduleTaskCtrl.TaskType.Yotogi)
- {
- ScheduleCSVData.Yotogi yotogi = (ScheduleCSVData.Yotogi)scheduleBase;
- if (yotogi.yotogiType == ScheduleCSVData.YotogiType.NewSex && yotogi.pairCondPersonal.Count > 0)
- {
- foreach (Maid maid2 in ScheduleAPI.GetNewYotogiHaremPairCandidateList(yotogi, yotogi.pairCondPersonal, maid))
- {
- SceneCharacterSelect.chara_guid_stock_list.Add(maid2.status.guid);
- }
- }
- }
- break;
- }
- }
- }
- public static void CreateVipCharaList()
- {
- SceneCharacterSelect.chara_guid_stock_list.Clear();
- List<Maid> vipWorkMaids = ScheduleAPI.GetVipWorkMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
- for (int i = 0; i < vipWorkMaids.Count; i++)
- {
- SceneCharacterSelect.chara_guid_stock_list.Add(vipWorkMaids[i].status.guid);
- }
- }
- public static void CreateFacilityCharaList()
- {
- SceneCharacterSelect.chara_guid_stock_list.Clear();
- List<Maid> facilityPowerUpMaids = ScheduleAPI.GetFacilityPowerUpMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
- for (int i = 0; i < facilityPowerUpMaids.Count; i++)
- {
- SceneCharacterSelect.chara_guid_stock_list.Add(facilityPowerUpMaids[i].status.guid);
- }
- }
- public static void CreateLifeModeCharaList()
- {
- SceneCharacterSelect.chara_guid_stock_list.Clear();
- List<Maid> list = new List<Maid>();
- CharacterSelectManager.DefaultMaidList(list);
- foreach (Maid maid in EmpireLifeModeAPI.SelectionMaidList(list))
- {
- SceneCharacterSelect.chara_guid_stock_list.Add(maid.status.guid);
- }
- }
- public static void StoreCharaGuidStockList()
- {
- SceneCharacterSelect.backup_chara_guid_stock_list = new List<string>(SceneCharacterSelect.chara_guid_stock_list);
- }
- public static void ReStoreCharaGuidStockList()
- {
- SceneCharacterSelect.chara_guid_stock_list.Clear();
- foreach (string item in SceneCharacterSelect.backup_chara_guid_stock_list)
- {
- SceneCharacterSelect.chara_guid_stock_list.Add(item);
- }
- }
- public static bool IsSelectChara()
- {
- return 0 < SceneCharacterSelect.chara_guid_stock_list.Count;
- }
- public void Awake()
- {
- this.adv_kag_ = GameMain.Instance.ScriptMgr.adv_kag;
- }
- public override void Start()
- {
- base.Start();
- this.move_screen_ = base.children_dic["Move"].GetComponent<WfScreenMoveChildren>();
- this.select_type_ = SceneCharacterSelect.SelectType.Communication;
- this.select_dance_chara_num_ = 1;
- string empty = string.Empty;
- string empty2 = string.Empty;
- if (this.adv_kag_.tag_backup != null && 0 < this.adv_kag_.tag_backup.Count && this.adv_kag_.tag_backup["name"] == "SceneCharacterSelect")
- {
- NDebug.Assert(this.adv_kag_.tag_backup.ContainsKey("label"), "SceneCharacterSelectにlabelの設定がされていませんでした");
- NDebug.Assert(this.adv_kag_.tag_backup.ContainsKey("type"), "SceneCharacterSelectにtypeの設定がされていませんでした");
- this.move_screen_.SetNextLabel(this.adv_kag_.tag_backup["label"]);
- if (this.adv_kag_.tag_backup.ContainsKey("cancel_label"))
- {
- CharacterSelectMain component = base.children_dic["Main"].GetComponent<CharacterSelectMain>();
- component.SetCancelLabel(this.adv_kag_.tag_backup["cancel_label"]);
- }
- try
- {
- this.select_type_ = (SceneCharacterSelect.SelectType)Enum.Parse(typeof(SceneCharacterSelect.SelectType), this.adv_kag_.tag_backup["type"]);
- }
- catch
- {
- NDebug.Assert("SelectType enum parse error.\n" + this.adv_kag_.tag_backup["type"], false);
- }
- if (this.adv_kag_.tag_backup["type"] == "コミュ")
- {
- this.select_type_ = SceneCharacterSelect.SelectType.Communication;
- }
- if (this.adv_kag_.tag_backup.ContainsKey("select_chara_num"))
- {
- this.select_dance_chara_num_ = int.Parse(this.adv_kag_.tag_backup["select_chara_num"]);
- }
- if (this.adv_kag_.tag_backup.ContainsKey("maid"))
- {
- this.select_maid_slot_ = int.Parse(this.adv_kag_.tag_backup["maid"]);
- }
- }
- if (this.select_type_ != SceneCharacterSelect.SelectType.VRComSelect && this.select_type_ != SceneCharacterSelect.SelectType.Additional)
- {
- GameMain.Instance.MainLight.Reset();
- GameMain.Instance.CharacterMgr.ResetCharaPosAll();
- GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
- }
- GameMain.Instance.SoundMgr.VoiceStopAll();
- this.CallScreen("Main");
- }
- protected override void SettingChildrenList(Dictionary<string, WfScreenChildren> children_dic)
- {
- string[] array = new string[]
- {
- "Main",
- "Move"
- };
- for (int i = 0; i < array.Length; i++)
- {
- WfScreenChildren component = UTY.GetChildObject(base.gameObject, array[i], false).GetComponent<WfScreenChildren>();
- component.parent_mgr = this;
- children_dic.Add(array[i], component);
- }
- }
- public WfScreenMoveChildren move_screen
- {
- get
- {
- return this.move_screen_;
- }
- }
- public SceneCharacterSelect.SelectType select_type
- {
- get
- {
- return this.select_type_;
- }
- }
- public int select_dance_chara_num
- {
- get
- {
- return this.select_dance_chara_num_;
- }
- }
- public int select_maid_slot
- {
- get
- {
- return this.select_maid_slot_;
- }
- }
- public static List<string> chara_guid_stock_list = new List<string>();
- public static List<string> backup_chara_guid_stock_list = new List<string>();
- public static List<Maid> select_maid_list = new List<Maid>();
- private WfScreenMoveChildren move_screen_;
- private ADVKagManager adv_kag_;
- private SceneCharacterSelect.SelectType select_type_;
- private int select_dance_chara_num_;
- private int select_maid_slot_;
- public enum SelectType
- {
- Communication,
- Yotogi,
- Vip,
- CompetitiveShow,
- TouchCharaSelect,
- VRComSelect,
- Free,
- Facility,
- Recollection,
- VRKaraokeSelect,
- Additional,
- NewYotogi,
- NewYotogiAdditional,
- LifeMode,
- LifeModeRecollection
- }
- }
|