Exemplo n.º 1
0
        public static string GetTagValue(TagElement element)
        {
            if (element == null)
            {
                return("NULL");
            }

            return(element.Value);
        }
Exemplo n.º 2
0
        public virtual void RemoveTag(TagElement element)
        {
            if (!elements.Contains(element))
            {
                Debug.LogWarning("Trying To Remove Non-Added Tag " + element.name);
                return;
            }

            elements.Remove(element);
        }
Exemplo n.º 3
0
        public static bool CompareMultiTag(this GameObject target, TagElement element)
        {
            var multiTag = GetMultiTag(target);

            if (multiTag == null)
            {
                return(false);
            }

            return(multiTag.Contains(element));
        }
Exemplo n.º 4
0
        public static GameObject FindObject(TagElement element)
        {
            for (int i = 0; i < All.Count; i++)
            {
                if (All[i].Contains(element))
                {
                    return(All[i].gameObject);
                }
            }

            return(null);
        }
Exemplo n.º 5
0
        public virtual void AddTag(TagElement element)
        {
            if (Contains(element))
            {
                Debug.LogError("Trying to add a duplicate Tag Element of " + element.name);

                return;
            }
            else
            {
                elements.Add(element);
            }
        }
Exemplo n.º 6
0
        public static GameObject[] FindObjects(TagElement element)
        {
            var list = new List <GameObject>();

            for (int i = 0; i < All.Count; i++)
            {
                if (All[i].Contains(element))
                {
                    list.Add(All[i].gameObject);
                }
            }

            return(list.ToArray());
        }
Exemplo n.º 7
0
 public virtual bool Contains(TagElement element)
 {
     return(elements.Contains(element));
 }
Exemplo n.º 8
0
 public static bool CompareMultiTag(this Transform target, TagElement element)
 {
     return(CompareMultiTag(target.gameObject, element));
 }