123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Xml.Linq;
- using MaidStatus;
- using UnityEngine;
- using wf;
- public class PhotoWindowManager : BasePhotoWindowManager
- {
- public static Dictionary<string, string> maidGuidReplaceDic { get; private set; }
- public static GameObject GetWorldTransformAxisParent()
- {
- GameObject gameObject = GameObject.Find("WorldTransformAxisParent");
- if (gameObject == null)
- {
- gameObject = new GameObject("WorldTransformAxisParent");
- }
- return gameObject;
- }
- public static WorldTransformAxis CreateWorldTransformAxis(GameObject move_target_obj, bool forc_create, bool small = false)
- {
- GameObject gameObject = GameObject.Find("WorldTransformAxisParent");
- if (gameObject == null)
- {
- gameObject = new GameObject("WorldTransformAxisParent");
- }
- GameObject gameObject2 = GameObject.Find("WorldTransformAxisParent/TargetObj_" + move_target_obj.name);
- if (gameObject2 != null && !forc_create)
- {
- return gameObject2.GetComponent<WorldTransformAxis>();
- }
- WorldTransformAxis component;
- if (!small)
- {
- if (GameMain.Instance.VRMode)
- {
- component = Utility.CreatePrefab(gameObject, "System/Prefab/XYZAxis_VR", false).GetComponent<WorldTransformAxis>();
- }
- else
- {
- component = Utility.CreatePrefab(gameObject, "System/Prefab/XYZAxis", true).GetComponent<WorldTransformAxis>();
- }
- }
- else if (GameMain.Instance.VRMode)
- {
- component = Utility.CreatePrefab(gameObject, "System/Prefab/XYZAxis_VR_s", false).GetComponent<WorldTransformAxis>();
- }
- else
- {
- component = Utility.CreatePrefab(gameObject, "System/Prefab/XYZAxis_s", false).GetComponent<WorldTransformAxis>();
- }
- component.TargetObject = move_target_obj;
- component.name = "TargetObj_" + move_target_obj.name;
- component.Update();
- return component;
- }
- public static GizmoRender CreateWorldTransformRotate(GameObject rotate_target_obj, bool forc_create)
- {
- GizmoRender gizmoRender = rotate_target_obj.GetComponent<GizmoRender>();
- if (gizmoRender == null)
- {
- gizmoRender = rotate_target_obj.AddComponent<GizmoRender>();
- gizmoRender.eRotate = true;
- gizmoRender.Visible = false;
- }
- return gizmoRender;
- }
- public static string path_photo_folder
- {
- get
- {
- return Path.GetFullPath(".\\") + "PhotoModeData\\";
- }
- }
- public static string path_photo_save
- {
- get
- {
- string text = Path.Combine(PhotoWindowManager.path_photo_folder, "SaveData");
- if (!Directory.Exists(text))
- {
- Directory.CreateDirectory(text);
- }
- return text;
- }
- }
- public static string path_photo_mod_motion
- {
- get
- {
- string text = Path.Combine(PhotoWindowManager.path_photo_folder, "Mod\\Motion");
- if (!Directory.Exists(text))
- {
- Directory.CreateDirectory(text);
- }
- return text;
- }
- }
- public override void Awake()
- {
- PhotoWindowManager.maidGuidReplaceDic = null;
- BaseMaidPhotoWindow[] componentsInChildren = base.transform.GetComponentsInChildren<BaseMaidPhotoWindow>(true);
- foreach (BaseMaidPhotoWindow baseMaidPhotoWindow in componentsInChildren)
- {
- if (!baseMaidPhotoWindow.gameObject.activeSelf)
- {
- baseMaidPhotoWindow.gameObject.SetActive(true);
- }
- }
- BasePhotoSubWindow[] componentsInChildren2 = base.transform.GetComponentsInChildren<BasePhotoSubWindow>(true);
- foreach (BasePhotoSubWindow basePhotoSubWindow in componentsInChildren2)
- {
- if (!basePhotoSubWindow.gameObject.activeSelf)
- {
- basePhotoSubWindow.gameObject.SetActive(true);
- }
- }
- base.Awake();
- }
- public override void Start()
- {
- Dictionary<PhotoWindowManager.WindowType, int> indexDic = new Dictionary<PhotoWindowManager.WindowType, int>();
- for (int i = 0; i < PhotoWindowManager.deserializeWindowArray.Length; i++)
- {
- indexDic.Add(PhotoWindowManager.deserializeWindowArray[i], i);
- }
- this.window_dic_.Sort((KeyValuePair<BasePhotoWindow, int> a, KeyValuePair<BasePhotoWindow, int> b) => indexDic[(a.Key as PhotoWindow).Type] - indexDic[(b.Key as PhotoWindow).Type]);
- base.Start();
- this.maid_store_data_.Clear();
- GameMain.Instance.CharacterMgr.DeactivateCharaAll();
- GameMain.Instance.CharacterMgr.DeactivateMaid(0);
- this.SaveAndLoadManager.folder_path = PhotoWindowManager.path_photo_save;
- this.SaveAndLoadManager.onSerializeEvent = new Func<XElement>(this.OnSerializeEvent);
- this.SaveAndLoadManager.onDeserializeEvent = new Action<XElement>(this.OnDeserializeEvent);
- this.is_first_ = true;
- }
- public virtual void Update()
- {
- if (this.is_first_)
- {
- this.OnMaidChangeEvent(null);
- this.is_first_ = false;
- uGUITutorialPanel.OpenTutorial("ScenePhotoMode", null, false);
- GameMain.Instance.SysShortcut.strSceneHelpName = "ScenePhotoMode";
- }
- }
- public void CallTutorial()
- {
- uGUITutorialPanel.OpenTutorial("ScenePhotoMode", null, true);
- }
- public void OpenSavePanel()
- {
- if (this.SaveAndLoadManager != null)
- {
- this.SaveAndLoadManager.Open(true);
- }
- }
- public void OpenLoadPanel()
- {
- if (this.SaveAndLoadManager != null)
- {
- this.SaveAndLoadManager.Open(false);
- }
- }
- protected override bool OnAddWindow(BasePhotoWindow add_win)
- {
- InterfaceMaidPhotoWindow interfaceMaidPhotoWindow = add_win as InterfaceMaidPhotoWindow;
- return interfaceMaidPhotoWindow != null;
- }
- public PhotoWindow GetWindow(PhotoWindowManager.WindowType window_type)
- {
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- InterfaceMaidPhotoWindow interfaceMaidPhotoWindow = keyValuePair.Key as InterfaceMaidPhotoWindow;
- if (interfaceMaidPhotoWindow != null)
- {
- if (interfaceMaidPhotoWindow.window_type == window_type)
- {
- return keyValuePair.Key as PhotoWindow;
- }
- }
- }
- return null;
- }
- public void OnMaidChangeEvent(Maid maid)
- {
- this.select_maid_ = maid;
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- (keyValuePair.Key as InterfaceMaidPhotoWindow).OnMaidChangeEvent(maid);
- }
- }
- public void OnMaidAddEvent(Maid maid, bool is_deserialize_load)
- {
- if (!this.maid_store_data_.ContainsKey(maid.status.guid))
- {
- this.maid_store_data_.Add(maid.status.guid, new Dictionary<string, Dictionary<string, string>>());
- }
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- (keyValuePair.Key as InterfaceMaidPhotoWindow).OnMaidAddEvent(maid, is_deserialize_load);
- }
- }
- public void OnFinishMaidDeserializeLoad()
- {
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- (keyValuePair.Key as InterfaceMaidPhotoWindow).OnFinishMaidDeserializeLoad();
- }
- }
- public void OnMaidRemoveEvent(Maid maid)
- {
- if (this.maid_store_data_.ContainsKey(maid.status.guid))
- {
- this.maid_store_data_.Remove(maid.status.guid);
- }
- if (maid == this.select_maid_)
- {
- this.select_maid_ = null;
- }
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- (keyValuePair.Key as InterfaceMaidPhotoWindow).OnMaidRemoveEvent(maid);
- }
- }
- public void OnMaidRemoveEventPrev(Maid maid)
- {
- if (maid == this.select_maid_)
- {
- this.select_maid_ = null;
- }
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- (keyValuePair.Key as InterfaceMaidPhotoWindow).OnMaidRemoveEventPrev(maid);
- }
- }
- public Dictionary<string, string> GetMaidStoreData(Maid maid, PhotoWindow photo_window)
- {
- if (maid == null)
- {
- return null;
- }
- return this.GetMaidStoreData(maid.status.guid, photo_window);
- }
- public Dictionary<string, string> GetMaidStoreData(string maid_guid, PhotoWindow photo_window)
- {
- if (string.IsNullOrEmpty(maid_guid))
- {
- return null;
- }
- if (!this.maid_store_data_[maid_guid].ContainsKey(photo_window.Type.ToString()))
- {
- this.maid_store_data_[maid_guid].Add(photo_window.Type.ToString(), new Dictionary<string, string>());
- }
- return this.maid_store_data_[maid_guid][photo_window.Type.ToString()];
- }
- public List<string> GetMaidStoreGuidList()
- {
- List<string> list = new List<string>();
- foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, string>>> keyValuePair in this.maid_store_data_)
- {
- list.Add(keyValuePair.Key);
- }
- return list;
- }
- public XElement OnSerializeEvent()
- {
- List<InterfaceMaidPhotoWindow> list = new List<InterfaceMaidPhotoWindow>();
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- (keyValuePair.Key as InterfaceMaidPhotoWindow).OnSerializeEvent();
- }
- CameraMain mainCamera = GameMain.Instance.MainCamera;
- this.world_store_data_["カメラ"] = new Dictionary<string, Dictionary<string, string>>();
- this.world_store_data_["カメラ"]["transform"] = new Dictionary<string, string>();
- this.world_store_data_["カメラ"]["transform"]["target_position"] = mainCamera.GetTargetPos().ToString("G9");
- this.world_store_data_["カメラ"]["transform"]["distance"] = mainCamera.GetDistance().ToString("G9");
- this.world_store_data_["カメラ"]["transform"]["rotation"] = mainCamera.GetAroundAngle().ToString("G9");
- List<XElement> list2 = new List<XElement>();
- foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, string>>> keyValuePair2 in this.world_store_data_)
- {
- string key = keyValuePair2.Key;
- Dictionary<string, Dictionary<string, string>> value = keyValuePair2.Value;
- List<XElement> list3 = new List<XElement>();
- foreach (KeyValuePair<string, Dictionary<string, string>> keyValuePair3 in value)
- {
- string key2 = keyValuePair3.Key;
- List<XElement> list4 = new List<XElement>();
- foreach (KeyValuePair<string, string> keyValuePair4 in keyValuePair3.Value)
- {
- string key3 = keyValuePair4.Key;
- string value2 = keyValuePair4.Value;
- XElement xelement = new XElement("elm", value2);
- xelement.SetAttributeValue("name", key3);
- list4.Add(xelement);
- }
- XElement xelement2 = new XElement("Category");
- xelement2.SetAttributeValue("name", key2);
- xelement2.Add(list4.ToArray());
- list3.Add(xelement2);
- }
- XElement xelement3 = new XElement("Type");
- xelement3.SetAttributeValue("name", key);
- xelement3.Add(list3);
- list2.Add(xelement3);
- }
- XElement xelement4 = new XElement("World", list2.ToArray());
- Dictionary<string, Dictionary<string, Dictionary<string, string>>> dictionary = this.maid_store_data_;
- List<XElement> list5 = new List<XElement>();
- foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, string>>> keyValuePair5 in this.maid_store_data_)
- {
- int num = -1;
- string key4 = keyValuePair5.Key;
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(key4);
- if (maid == null)
- {
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetManCount(); i++)
- {
- Maid man = GameMain.Instance.CharacterMgr.GetMan(i);
- if (man != null && man.status.guid == key4)
- {
- num = i;
- maid = man;
- break;
- }
- }
- }
- if (maid == null)
- {
- Debug.Log("GUIDからMaidを探せなかったので保存されませんでした\n" + key4);
- }
- else
- {
- if (!keyValuePair5.Value.ContainsKey(PhotoWindowManager.WindowType.Placement.ToString()))
- {
- keyValuePair5.Value[PhotoWindowManager.WindowType.Placement.ToString()] = new Dictionary<string, string>();
- }
- Dictionary<string, string> dictionary2 = keyValuePair5.Value[PhotoWindowManager.WindowType.Placement.ToString()];
- dictionary2["position"] = maid.gameObject.transform.position.ToString("G9");
- dictionary2["rotation"] = maid.gameObject.transform.rotation.ToString("G9");
- dictionary2["scale"] = maid.gameObject.transform.localScale.ToString("G9");
- dictionary2["visible"] = (maid.transform.GetChild(0).localScale.x != 0f).ToString();
- List<XElement> list6 = new List<XElement>();
- foreach (KeyValuePair<string, Dictionary<string, string>> keyValuePair6 in keyValuePair5.Value)
- {
- XElement xelement5 = new XElement("Type");
- xelement5.SetAttributeValue("name", keyValuePair6.Key);
- List<XElement> list7 = new List<XElement>();
- foreach (KeyValuePair<string, string> keyValuePair7 in keyValuePair6.Value)
- {
- string key5 = keyValuePair7.Key;
- string value3 = keyValuePair7.Value;
- XElement xelement6 = new XElement("elm", value3);
- xelement6.SetAttributeValue("name", key5);
- list7.Add(xelement6);
- }
- xelement5.Add(list7.ToArray());
- list6.Add(xelement5);
- }
- XElement xelement7 = new XElement("Maid");
- xelement7.SetAttributeValue("guid", key4);
- List<XElement> list8 = new List<XElement>();
- NamePair charaName = maid.status.charaName;
- list8.Add(new XElement("name", charaName.name1 + " " + charaName.name2));
- if (maid.boMAN)
- {
- list8.Add(new XElement("man_sloat", num.ToString()));
- }
- xelement7.Add(list8.ToArray());
- xelement7.Add(list6.ToArray());
- list5.Add(xelement7);
- }
- }
- XElement xelement8 = new XElement("Maids", list5.ToArray());
- return new XElement("PhotSetting", new object[]
- {
- xelement4,
- xelement8
- });
- }
- public List<InterfaceMaidPhotoWindow> GetDeserializeWindowList()
- {
- List<InterfaceMaidPhotoWindow> list = new List<InterfaceMaidPhotoWindow>();
- for (int i = 0; i < PhotoWindowManager.deserializeWindowArray.Length; i++)
- {
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- if ((keyValuePair.Key as InterfaceMaidPhotoWindow).window_type == PhotoWindowManager.deserializeWindowArray[i])
- {
- list.Add(keyValuePair.Key as InterfaceMaidPhotoWindow);
- break;
- }
- }
- }
- return list;
- }
- public void OnDeserializeEvent(XElement xml_data)
- {
- List<InterfaceMaidPhotoWindow> call_window_list = this.GetDeserializeWindowList();
- for (int i = 0; i < call_window_list.Count; i++)
- {
- call_window_list[i].OnReset();
- }
- XElement xelement = xml_data.Element("PhotSetting");
- XElement xelement2 = xelement.Element("World");
- XElement xelement3 = xelement.Element("Maids");
- this.world_store_data_.Clear();
- foreach (XElement xelement4 in xelement2.Elements("Type"))
- {
- string value = xelement4.Attribute("name").Value;
- this.world_store_data_[value] = new Dictionary<string, Dictionary<string, string>>();
- foreach (XElement xelement5 in xelement4.Elements("Category"))
- {
- string value2 = xelement5.Attribute("name").Value;
- this.world_store_data_[value][value2] = new Dictionary<string, string>();
- foreach (XElement xelement6 in xelement5.Elements("elm"))
- {
- this.world_store_data_[value][value2].Add(xelement6.Attribute("name").Value, xelement6.Value);
- }
- }
- }
- this.maid_store_data_.Clear();
- List<KeyValuePair<string, string>> list = new List<KeyValuePair<string, string>>();
- foreach (XElement xelement7 in xelement3.Elements("Maid"))
- {
- bool flag = xelement7.Element("man_sloat") != null;
- int nManNo = (!flag) ? 0 : int.Parse(xelement7.Element("man_sloat").Value);
- string key = xelement7.Attribute("guid").Value;
- string value3 = xelement7.Element("name").Value;
- if (flag)
- {
- Maid man = GameMain.Instance.CharacterMgr.GetMan(nManNo);
- if (man == null)
- {
- continue;
- }
- key = man.status.guid;
- }
- this.maid_store_data_[key] = new Dictionary<string, Dictionary<string, string>>();
- foreach (XElement xelement8 in xelement7.Elements("Type"))
- {
- string value4 = xelement8.Attribute("name").Value;
- this.maid_store_data_[key][value4] = new Dictionary<string, string>();
- foreach (XElement xelement9 in xelement8.Elements("elm"))
- {
- this.maid_store_data_[key][value4].Add(xelement9.Attribute("name").Value, xelement9.Value);
- }
- }
- if (!flag)
- {
- list.Add(new KeyValuePair<string, string>(key, value3));
- }
- else
- {
- this.maid_store_data_[key]["is_man"] = new Dictionary<string, string>();
- this.maid_store_data_[key]["is_man"].Add("no", nManNo.ToString());
- }
- }
- this.SaveAndLoadManager.LoadReplaceMaidPanel.OnReplaceEndEvent = delegate(Dictionary<string, Maid> replace_dic)
- {
- PhotoWindowManager.maidGuidReplaceDic = new Dictionary<string, string>();
- foreach (KeyValuePair<string, Maid> keyValuePair in replace_dic)
- {
- Dictionary<string, Dictionary<string, string>> value5 = this.maid_store_data_[keyValuePair.Key];
- this.maid_store_data_.Remove(keyValuePair.Key);
- if (keyValuePair.Value != null)
- {
- this.maid_store_data_[keyValuePair.Value.status.guid] = value5;
- }
- PhotoWindowManager.maidGuidReplaceDic.Add(keyValuePair.Key, (!(keyValuePair.Value != null)) ? string.Empty : keyValuePair.Value.status.guid);
- }
- for (int j = 0; j < call_window_list.Count; j++)
- {
- call_window_list[j].OnDeserializeEvent();
- }
- PhotoWindowManager.maidGuidReplaceDic = null;
- };
- this.SaveAndLoadManager.LoadReplaceMaidPanel.CheckAndStart(list);
- Dictionary<string, string> dictionary = this.world_store_data_["カメラ"]["transform"];
- GameMain.Instance.MainCamera.SetTargetPos(Parse.Vector3(dictionary["target_position"]), true);
- GameMain.Instance.MainCamera.SetDistance(float.Parse(dictionary["distance"]), true);
- GameMain.Instance.MainCamera.SetAroundAngle(Parse.Vector2(dictionary["rotation"]), true);
- }
- public void ScreenShot()
- {
- GameMain.Instance.SoundMgr.PlaySe("SE022.ogg", false);
- GameMain.Instance.MainCamera.ScreenShot(true);
- }
- public void AllCloseWindow()
- {
- GameObject childObject = UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent", false);
- WindowPartsWindowVisible[] componentsInChildren = childObject.GetComponentsInChildren<WindowPartsWindowVisible>();
- for (int i = 0; i < componentsInChildren.Length; i++)
- {
- if (componentsInChildren[i].TargetWindow.visible)
- {
- componentsInChildren[i].TargetWindow.visible = false;
- }
- }
- }
- public void AllInitPosWindow()
- {
- GameObject childObject = UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent", false);
- WindowPartsWindowVisible[] componentsInChildren = childObject.GetComponentsInChildren<WindowPartsWindowVisible>();
- for (int i = 0; i < componentsInChildren.Length; i++)
- {
- componentsInChildren[i].TargetWindow.ResetPosition();
- }
- }
- public void SetUIDrawOn()
- {
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- keyValuePair.Key.gameObject.SetActive(true);
- }
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtns/Grid", false).SetActive(true);
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtnsLine2/Grid", false).SetActive(true);
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtns/UIOFF", false).SetActive(true);
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtnsLine2/End", false).SetActive(true);
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtnsLine2/UION", false).SetActive(false);
- for (int i = 0; i < this.ui_hide_object_list_.Count; i++)
- {
- this.ui_hide_object_list_[i].SetActive(true);
- }
- for (int j = 0; j < this.ui_gizmo_object_list_.Count; j++)
- {
- this.ui_gizmo_object_list_[j].Visible = true;
- }
- this.ui_hide_object_list_.Clear();
- this.ui_gizmo_object_list_.Clear();
- }
- public void SetUIDrawOff()
- {
- foreach (KeyValuePair<BasePhotoWindow, int> keyValuePair in this.window_dic_)
- {
- keyValuePair.Key.gameObject.SetActive(false);
- }
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtns/Grid", false).SetActive(false);
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtnsLine2/Grid", false).SetActive(false);
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtns/UIOFF", false).SetActive(false);
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtnsLine2/End", false).SetActive(false);
- UTY.GetChildObject(base.gameObject, "WindowVisibleBtnsParent/WindowVisibleBtnsLine2/UION", false).SetActive(true);
- this.ui_hide_object_list_.Clear();
- GameObject gameObject = GameObject.Find("WorldTransformAxisParent");
- if (gameObject != null)
- {
- Transform transform = gameObject.transform;
- for (int i = 0; i < transform.childCount; i++)
- {
- if (transform.gameObject.activeSelf)
- {
- transform.gameObject.SetActive(true);
- this.ui_hide_object_list_.Add(transform.gameObject);
- }
- }
- gameObject.SetActive(false);
- }
- this.ui_gizmo_object_list_.Clear();
- string[] array = new string[]
- {
- "BG",
- "Character/Active"
- };
- for (int j = 0; j < array.Length; j++)
- {
- GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, array[j], true);
- if (!(childObject == null))
- {
- GizmoRender[] componentsInChildren = childObject.GetComponentsInChildren<GizmoRender>();
- for (int k = 0; k < componentsInChildren.Length; k++)
- {
- if (componentsInChildren[k].Visible)
- {
- componentsInChildren[k].Visible = false;
- this.ui_gizmo_object_list_.Add(componentsInChildren[k]);
- }
- }
- }
- }
- GameObject gameObject2 = GameObject.Find("PoseEditWorkParent");
- if (gameObject2 != null)
- {
- GizmoRender[] componentsInChildren2 = gameObject2.GetComponentsInChildren<GizmoRender>();
- for (int l = 0; l < componentsInChildren2.Length; l++)
- {
- if (componentsInChildren2[l].Visible)
- {
- componentsInChildren2[l].Visible = false;
- this.ui_gizmo_object_list_.Add(componentsInChildren2[l]);
- }
- }
- }
- }
- public void OnEnd()
- {
- List<InterfaceMaidPhotoWindow> deserializeWindowList = this.GetDeserializeWindowList();
- for (int i = 0; i < deserializeWindowList.Count; i++)
- {
- deserializeWindowList[i].OnReset();
- }
- }
- public int GetActiveMaidCount()
- {
- return this.GetWindow(PhotoWindowManager.WindowType.Placement).GetComponentInChildren<PlacementWindow>().GetActiveMaidCount();
- }
- public Maid select_maid
- {
- get
- {
- return this.select_maid_;
- }
- }
- protected override string save_fullpath_uidata
- {
- get
- {
- string fullPath = Path.GetFullPath(".\\");
- string str = fullPath + "PhotoModeData/SaveData";
- return str + "/PhotoModeUISetting.save";
- }
- }
- protected override string save_header_uidata
- {
- get
- {
- return "CM3D2_PhotoModeUISetting";
- }
- }
- public static PhotoWindowManager.WindowType[] deserializeWindowArray = new PhotoWindowManager.WindowType[]
- {
- PhotoWindowManager.WindowType.Sound,
- PhotoWindowManager.WindowType.Placement,
- PhotoWindowManager.WindowType.Face,
- PhotoWindowManager.WindowType.Motion,
- PhotoWindowManager.WindowType.PoseEdit,
- PhotoWindowManager.WindowType.BG,
- PhotoWindowManager.WindowType.ObjectCreate,
- PhotoWindowManager.WindowType.BGObject,
- PhotoWindowManager.WindowType.Light,
- PhotoWindowManager.WindowType.ObjectManager,
- PhotoWindowManager.WindowType.Effect,
- PhotoWindowManager.WindowType.Message,
- PhotoWindowManager.WindowType.ScenePreset,
- PhotoWindowManager.WindowType.AlignmentPreset,
- PhotoWindowManager.WindowType.MaidItem,
- PhotoWindowManager.WindowType.Undressing,
- PhotoWindowManager.WindowType.GravityContro
- };
- public PhotoModeSaveAndLoad SaveAndLoadManager;
- public UIButton EndButton;
- public Action<Maid> CallEditSceneFunction;
- public List<Action<Maid>> onMaidChangeEventList = new List<Action<Maid>>();
- private bool is_first_;
- private Maid select_maid_;
- private Dictionary<string, Dictionary<string, Dictionary<string, string>>> maid_store_data_ = new Dictionary<string, Dictionary<string, Dictionary<string, string>>>();
- private List<GameObject> ui_hide_object_list_ = new List<GameObject>();
- private List<GizmoRender> ui_gizmo_object_list_ = new List<GizmoRender>();
- public enum WindowType
- {
- ObjectManager,
- BG,
- Placement,
- Motion,
- Face,
- BGObject,
- MaidItem,
- Light,
- Undressing,
- Effect,
- Sound,
- PoseEdit,
- Message,
- ScenePreset,
- AlignmentPreset,
- ObjectCreate,
- GravityContro
- }
- }
|