Beispiel #1
0
        bool AlreadyChecked(GroupCore group)
        {
            for (int i = 0; i < groupsCheckedLen; i++)
            {
                if (groupsChecked[i].id == group.id)
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #2
0
        public static bool Contain(this DictionaryGroup container, GroupCore groupCore)
        {
            var len = container.len;

            for (int i = 0; i < len; i++)
            {
                var groupAdded = container.storage[i];
                if (groupAdded.Equals(groupCore))
                {
                    return(true);
                }
            }
            return(false);
        }
Beispiel #3
0
 internal abstract void AddGroupExclude(GroupCore groupCore);
Beispiel #4
0
 public static GroupCore Add(this DictionaryGroup container, GroupCore group)
 {
     ref var len     = ref container.len;
Beispiel #5
0
        public static bool TryGetValue(this DictionaryGroup container, Type t, Composition composition, out GroupCore group)
        {
            var len = container.len;

            for (int i = 0; i < len; i++)
            {
                var instance = container.storage[i];
                if (t != instance.GetType())
                {
                    continue;
                }

                if (instance.composition.hash.value == composition.hash.value)
                {
                    group = instance;
                    return(true);
                }
            }

            group = default;
            return(false);
        }