Exemple #1
0
        public bool DoesHaveTrackable(TrackableItem item)
        {
            for (int i = 0; i < trackables.Count; i++)
            {
                if (trackables[i].type.Equals(item.type))
                {
                    return(trackables[i].items.Contains(item));
                }
            }

            return(false);
        }
Exemple #2
0
        public void AddItemToTrackable(TrackableItem item)
        {
            for (int i = 0; i < trackables.Count; i++)
            {
                if (trackables[i].type.Equals(item.type))
                {
                    trackables[i].items.Add(item);
                    return;
                }
            }

            Debug.LogWarning("There is no trackable list of the type item belongs. " + item.type);
        }
Exemple #3
0
        public void RemoveItemFromTrackable(TrackableItem item)
        {
            for (int i = 0; i < trackables.Count; i++)
            {
                if (trackables[i].type.Equals(item.type))
                {
                    if (trackables[i].items.Contains(item))
                    {
                        trackables[i].items.Remove(item);
                        return;
                    }
                    else
                    {
                        Debug.LogWarning("Item is not in the list! " + item);
                    }
                }
            }

            Debug.LogWarning("There is no trackable list of the type item belongs " + item.type);
        }