Пример #1
0
        /**
         * Add a new group.
         */
        public void NewGroup(string InName, GameObject[] InObjects)
        {
            Group newGroup = new Group(InName, InObjects, false, false);

            if (sceneGroups != null)
            {
                ArrayExt.Add <Group>(ref sceneGroups, newGroup);
            }
            else
            {
                sceneGroups = new Group[] { newGroup };
            }
        }
Пример #2
0
        /**
         * Remove group at index @i from the container list.
         */
        public void RemoveGroup(int i)
        {
            sceneGroups[i].RemoveNullOrEmpty();

            foreach (GameObject obj in sceneGroups[i].objects)
            {
                        #if UNITY_3_5
                obj.active = true;
                        #else
                obj.SetActive(true);
                        #endif
                obj.hideFlags = 0;
            }

            ArrayExt.RemoveAt(ref sceneGroups, i);
        }
Пример #3
0
 /**
  * Remove @InObjects from objects.
  */
 public void RemoveObjects(GameObject[] InObjects)
 {
     ArrayExt.Remove(ref objects, InObjects);
 }
Пример #4
0
 /**
  * Remove @InObject from objects.
  */
 public void RemoveObject(GameObject InObject)
 {
     ArrayExt.Remove(ref objects, InObject);
 }
Пример #5
0
 /**
  * Add @InGameObjects to the list of objects in this group.
  */
 public void AddObjects(GameObject[] InObjects)
 {
     ArrayExt.AddRange(ref objects, InObjects);
     objects = objects.Distinct().ToArray();
 }