Exemplo n.º 1
0
        public void DisableOther()
        {
            List <GameObject> list = new List <GameObject>();
            bool isNeed            = false;
            int  count             = VRCattleManager.allObjs.Count;

            if (VRCattleManager.selectedObjs.Count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    Transform t = VRCattleManager.allObjs[i];
                    if (!VRCattleManager.selectedObjs.Contains(t))
                    {
                        if (t.gameObject.activeSelf && !isNeed)
                        {
                            isNeed = true;
                        }
                        list.Add(t.gameObject);
                    }
                }
                if (isNeed)
                {
                    VRCattleUndo.DisableObj(list.ToArray());
                }
            }
        }
Exemplo n.º 2
0
 public void ResetAll()
 {
     VRCattleManager.instance.OnSelectClear();
     ResetDisable();
     ResetTransparent();
     VRCattleUndo.Clear();
 }
Exemplo n.º 3
0
        public void TransparentOther()
        {
            List <MeshRenderer> list = new List <MeshRenderer>();
            bool isNeed = false;
            int  count  = VRCattleManager.allObjs.Count;

            if (VRCattleManager.selectedObjs.Count > 0)
            {
                for (int i = 0; i < count; i++)
                {
                    Transform t = VRCattleManager.allObjs[i];
                    if (!VRCattleManager.selectedObjs.Contains(t))
                    {
                        MeshRenderer mr = t.GetComponent <MeshRenderer>();
                        if (mr.material.color.a != VRCattleManager.transparentValue)
                        {
                            isNeed = true;
                        }
                        list.Add(mr);
                    }
                }
                if (isNeed)
                {
                    VRCattleUndo.TransparentObj(list.ToArray());
                }
            }
        }
Exemplo n.º 4
0
        public void Disable()
        {
            int count = VRCattleManager.selectedObjs.Count;

            if (count > 0)
            {
                GameObject[] objs = new GameObject[count];
                for (int i = 0; i < count; i++)
                {
                    Transform t = VRCattleManager.selectedObjs[i];
                    objs[i] = t.gameObject;
                    BlurOutlineCommandBuffer.Remove(t.GetComponent <Renderer>());
                }
                VRCattleManager.selectedObjs.Clear();
                VRCattleUndo.DisableObj(objs);
            }
        }
Exemplo n.º 5
0
 public void Undo()
 {
     VRCattleUndo.Pop();
 }