Exemplo n.º 1
0
        public static void m_dicPartsTypeWearMode_ext()
        {
            if (m_dicPartsTypeWearMode_ext_flag)
            {
                return;
            }
            m_dicPartsTypeWearMode_ext_flag = true;
            string text = "edit_mask_define_creator.nei";

            SceneEditInfo.dicPartsTypeWearMode_ = new Dictionary <MPN, TBody.MaskMode>();
            using (AFileBase afileBase = GameUty.FileSystem.FileOpen(text))
            {
                using (CsvParser csvParser = new CsvParser())
                {
                    bool condition = csvParser.Open(afileBase);

                    for (int i = 1; i < csvParser.max_cell_y; i++)
                    {
                        if (csvParser.IsCellToExistData(0, i))
                        {
                            int num = 0;
                            MPN key = MPN.null_mpn;
                            try
                            {
                                key = (MPN)Enum.Parse(typeof(MPN), csvParser.GetCellAsString(num++, i));
                            }
                            catch
                            {}
                            TBody.MaskMode value = TBody.MaskMode.None;
                            try
                            {
                                value = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), csvParser.GetCellAsString(num++, i));
                            }
                            catch
                            {
                            }

                            SceneEditInfo.dicPartsTypeWearMode_[key] = value;
                        }
                    }
                }
            }
        }
        void Update()
        {
            if (Application.loadedLevel != 5)
            {
                return;
            }
            if (editViewReset == null)
            {
                editViewReset = UnityEngine.Object.FindObjectOfType <EditViewReset>();
            }
            if (sceneEdit == null)
            {
                sceneEdit = UnityEngine.Object.FindObjectOfType <SceneEdit>();
            }
            if (editViewReset != null && sceneEdit != null)
            {
                Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);

                if (bLevelWasLoaded)
                {
                    bLevelWasLoaded = false;
                    LoadSettings(maid);
                }

                // UICamera.InputEnable が False になるとサムネール撮影用のために着衣状態になる
                TBody tbody = maid == null ? null : maid.body0;
                if (tbody != null && fieldInfo_TBody_m_eMaskMode != null && UICamera.InputEnable)
                {
                    lastMaid            = maid;
                    bLastAutoCam        = editViewReset.GetVisibleAutoCam();
                    bLastEyeToCam       = editViewReset.GetVisibleEyeToCam();
                    lastBgName          = GameMain.Instance.BgMgr.GetBGName();
                    lastClothMaskMode   = (TBody.MaskMode)fieldInfo_TBody_m_eMaskMode.GetValue(tbody);
                    lastPoseName        = tbody.LastAnimeFN;
                    lastCameraPos       = mainCamera.GetPos();
                    lastCameraTargetPos = mainCamera.GetTargetPos();
                    lastCameraDistance  = mainCamera.GetDistance();
                    lastCameraRotation  = Camera.main.gameObject.transform.rotation;
                    lastCameraFov       = Camera.main.fieldOfView;
                }
            }
        }
        void Update()
        {
            if (Application.loadedLevel != 5)
            {
                return;
            }
            if (editViewReset == null)
            {
                editViewReset = UnityEngine.Object.FindObjectOfType<EditViewReset>();
            }
            if (sceneEdit == null)
            {
                sceneEdit = UnityEngine.Object.FindObjectOfType<SceneEdit>();
            }
            if (editViewReset != null && sceneEdit != null)
            {
                Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);

                if (bLevelWasLoaded)
                {
                    bLevelWasLoaded = false;
                    LoadSettings(maid);
                }

                // UICamera.InputEnable が False になるとサムネール撮影用のために着衣状態になる
                TBody tbody = maid == null ? null : maid.body0;
                if (tbody != null && fieldInfo_TBody_m_eMaskMode != null && UICamera.InputEnable)
                {
                    lastMaid = maid;
                    bLastAutoCam = editViewReset.GetVisibleAutoCam();
                    bLastEyeToCam = editViewReset.GetVisibleEyeToCam();
                    lastBgName = GameMain.Instance.BgMgr.GetBGName();
                    lastClothMaskMode = (TBody.MaskMode)fieldInfo_TBody_m_eMaskMode.GetValue(tbody);
                    lastPoseName = tbody.LastAnimeFN;
                    lastCameraPos = mainCamera.GetPos();
                    lastCameraTargetPos = mainCamera.GetTargetPos();
                    lastCameraDistance = mainCamera.GetDistance();
                    lastCameraRotation = Camera.main.gameObject.transform.rotation;
                    lastCameraFov = Camera.main.fieldOfView;
                }
            }
        }
        void Update()
        {
            if (Application.loadedLevel != 5)
            {
                return;
            }
            if (editViewReset == null)
            {
                editViewReset = UnityEngine.Object.FindObjectOfType <EditViewReset>();
            }
            if (sceneEdit == null)
            {
                sceneEdit = UnityEngine.Object.FindObjectOfType <SceneEdit>();
            }

            {
                string     gridName = "/UI Root/PresetButtonPanel/ItemPresetsViewer/Scroll View/Grid";
                GameObject goGrid   = GameObject.Find(gridName);
                if (goGrid != null)
                {
                    if (poseButtonCallback == null)
                    {
                        poseButtonCallback = new EventDelegate.Callback(ClickPoseCallback);
                    }
                    foreach (Transform t in goGrid.transform)
                    {
                        if (!t.name.StartsWith("Pose_"))
                        {
                            continue;
                        }
                        GameObject go       = t.gameObject;
                        UIButton   uiButton = go.GetComponent <UIButton>();
                        EventDelegate.Add(uiButton.onClick, poseButtonCallback);
                    }
                }
            }

            if (editViewReset != null && sceneEdit != null)
            {
                Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);

                if (bLevelWasLoaded)
                {
                    bLevelWasLoaded = false;
                    LoadSettings(maid);
                }

                // UICamera.InputEnable が False になるとサムネール撮影用のために着衣状態になる
                TBody tbody = maid == null ? null : maid.body0;
                if (tbody != null && fieldInfo_TBody_m_eMaskMode != null && UICamera.InputEnable)
                {
                    lastMaid            = maid;
                    bLastAutoCam        = editViewReset.GetVisibleAutoCam();
                    bLastEyeToCam       = editViewReset.GetVisibleEyeToCam();
                    lastBgName          = GameMain.Instance.BgMgr.GetBGName();
                    lastClothMaskMode   = (TBody.MaskMode)fieldInfo_TBody_m_eMaskMode.GetValue(tbody);
                    lastCameraPos       = mainCamera.GetPos();
                    lastCameraTargetPos = mainCamera.GetTargetPos();
                    lastCameraDistance  = mainCamera.GetDistance();
                    lastCameraRotation  = Camera.main.gameObject.transform.rotation;
                    lastCameraFov       = Camera.main.fieldOfView;
                }
            }
        }
        void Update()
        {
            if (Application.loadedLevel != 5)
            {
                return;
            }
            if (editViewReset == null)
            {
                editViewReset = UnityEngine.Object.FindObjectOfType<EditViewReset>();
            }
            if (sceneEdit == null)
            {
                sceneEdit = UnityEngine.Object.FindObjectOfType<SceneEdit>();
            }

            {
                string gridName = "/UI Root/PresetButtonPanel/ItemPresetsViewer/Scroll View/Grid";
                GameObject goGrid = GameObject.Find(gridName);
                if (goGrid != null)
                {
                    if (poseButtonCallback == null)
                    {
                        poseButtonCallback = new EventDelegate.Callback(ClickPoseCallback);
                    }
                    foreach (Transform t in goGrid.transform)
                    {
                        if (!t.name.StartsWith("Pose_"))
                        {
                            continue;
                        }
                        GameObject go = t.gameObject;
                        UIButton uiButton = go.GetComponent<UIButton>();
                        EventDelegate.Add(uiButton.onClick, poseButtonCallback);
                    }
                }
            }

            if (editViewReset != null && sceneEdit != null)
            {
                Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);

                if (bLevelWasLoaded)
                {
                    bLevelWasLoaded = false;
                    LoadSettings(maid);
                }

                // UICamera.InputEnable が False になるとサムネール撮影用のために着衣状態になる
                TBody tbody = maid == null ? null : maid.body0;
                if (tbody != null && fieldInfo_TBody_m_eMaskMode != null && UICamera.InputEnable)
                {
                    lastMaid = maid;
                    bLastAutoCam = editViewReset.GetVisibleAutoCam();
                    bLastEyeToCam = editViewReset.GetVisibleEyeToCam();
                    lastBgName = GameMain.Instance.BgMgr.GetBGName();
                    lastClothMaskMode = (TBody.MaskMode)fieldInfo_TBody_m_eMaskMode.GetValue(tbody);
                    lastCameraPos = mainCamera.GetPos();
                    lastCameraTargetPos = mainCamera.GetTargetPos();
                    lastCameraDistance = mainCamera.GetDistance();
                    lastCameraRotation = Camera.main.gameObject.transform.rotation;
                    lastCameraFov = Camera.main.fieldOfView;
                }
            }
        }