Пример #1
0
        public VRCattleSaveXml()
        {
            if (VRCattleUIManager.instance)
            {
                List <Transform> list = new List <Transform>();
                list = VRCattleManager.disabledObjs;
                int count = list.Count;
                for (int i = 0; i < count; i++)
                {
                    this.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(list[i]));
                }

                List <MeshRenderer> temp = VRCattleManager.transparentObjs;
                count = temp.Count;
                for (int i = 0; i < count; i++)
                {
                    this.transparent.Add(VRCattleBusinessLogic.GetNodeIDByTransform(temp[i].transform));
                }

                this.bodyStates = VRCattleUIManager.instance.bodyStates;

                this.cameraPos = VRCattleManager.instance.mainCamera.position;
                this.cameraRot = VRCattleManager.instance.mainCamera.rotation;
            }
        }
Пример #2
0
 public void OnSelect(Transform t, bool isKeyBoard)
 {
     if (t == null)
     {
         return;
     }
     if (selectedObjs.Contains(t))
     {
         if (!isKeyBoard)
         {
             BlurOutlineCommandBuffer.Remove(t.GetComponent <Renderer>());
             selectedObjs.Remove(t);
             if (selectedObjs.Count == 0)
             {
                 VRCattleUIManager.instance.page06LeftToolChildBts.SetActive(false);
             }
             ChangeInfoAndCursound(null);
             if (VRCattleUIManager.instance.Page06Bt02State)
             {
                 VRCattleUIManager.instance.RemoveTag(t);
             }
         }
     }
     else
     {
         if (!VRCattleUIManager.instance.IsMulti && selectedObjs.Count > 0)
         {
             OnSelectClear();
         }
         BlurOutlineCommandBuffer.Add(t.GetComponent <Renderer>());
         selectedObjs.Add(t);
         if (!VRCattleUIManager.instance.page06LeftToolChildBts.activeSelf)
         {
             VRCattleUIManager.instance.page06LeftToolChildBts.SetActive(true);
         }
         Node node = VRCattleDataBase.instance.GetNodeByID(VRCattleBusinessLogic.GetNodeIDByTransform(t));
         ChangeInfoAndCursound(node);
         if (VRCattleUIManager.instance.Page06Bt02State)
         {
             VRCattleUIManager.instance.CreateTag(t);
         }
     }
 }
Пример #3
0
        public void AddToVSX(ref VRCattleSaveXml vsx, bool isMale)
        {
            int length = 0;

            if (!isMale)
            {
                length = beiPiMale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(beiPiMale[i].transform));
                }
                length = guGeMale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(guGeMale[i].transform));
                }
                length = jiRouMale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(jiRouMale[i].transform));
                }
                length = linBaMale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(linBaMale[i].transform));
                }
                length = miNiaoMale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(miNiaoMale[i].transform));
                }
                length = neiFenMiMale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(neiFenMiMale[i].transform));
                }
                length = shengZhiMale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(shengZhiMale[i].transform));
                }
            }
            else
            {
                length = beiPiFemale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(beiPiFemale[i].transform));
                }
                length = miNiaoFemale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(miNiaoFemale[i].transform));
                }
                length = shengZhiFemale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(shengZhiFemale[i].transform));
                }
                length = shenJingFemale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(shenJingFemale[i].transform));
                }
                length = xunHuanFemale.Length;
                for (int i = 0; i < length; i++)
                {
                    vsx.disable.Add(VRCattleBusinessLogic.GetNodeIDByTransform(xunHuanFemale[i].transform));
                }
            }
        }