示例#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 ForPage02Bt02()
 {
     if (page02CurrentItem != null)
     {
         ClosePage02();
         OpenPage06();
         VRCattleBusinessLogic.LoadFromSave(File.ReadAllText(Page02SaveBtPath + "\\" + page02CurrentItem.Name + "\\data.vhsx"));
     }
 }
示例#3
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this);
     }
     else
     {
         instance = this;
     }
 }
示例#4
0
        public void ForTuPuLoadBts(string str)
        {
            VRCattleBusinessLogic.instance.ResetAll();
            ClosePage03();
            OpenPage06();

            TextAsset asset = Resources.Load("Tupu/" + sex.ToString() + "/" + str) as TextAsset;

            if (asset == null)
            {
                return;
            }
            VRCattleBusinessLogic.LoadFromSave(asset.text);
            Resources.UnloadAsset(asset);
        }
示例#5
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);
         }
     }
 }
示例#6
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));
                }
            }
        }
示例#7
0
 public static Transform GetTransform(this string nodeID)
 {
     return(VRCattleBusinessLogic.GetTransformByNodeID(nodeID));
 }
示例#8
0
 public void ForPage06Bt14()
 {
     VRCattleBusinessLogic.instance.ShowAll();
     VRCattleBusinessLogic.LoadFromSave(VRCattleManager.currentLoaded, true, false);
 }
示例#9
0
 public void ForPage06Bt13()
 {
     VRCattleBusinessLogic.instance.ResetAll();
     VRCattleBusinessLogic.LoadFromSave(VRCattleManager.currentLoaded);
 }