예제 #1
0
        public static string GetTagValue(TagElement element)
        {
            if (element == null)
            {
                return("NULL");
            }

            return(element.Value);
        }
예제 #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);
        }
예제 #3
0
        public static bool CompareMultiTag(this GameObject target, TagElement element)
        {
            var multiTag = GetMultiTag(target);

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

            return(multiTag.Contains(element));
        }
예제 #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);
        }
예제 #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);
            }
        }
예제 #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());
        }
예제 #7
0
 public virtual bool Contains(TagElement element)
 {
     return(elements.Contains(element));
 }
예제 #8
0
 public static bool CompareMultiTag(this Transform target, TagElement element)
 {
     return(CompareMultiTag(target.gameObject, element));
 }