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

            return(false);
        }
예제 #2
0
        public static bool Contain(this CacheGroup container, GroupCore groupCore)
        {
            var len = container.length;

            for (int i = 0; i < len; i++)
            {
                var groupAdded = container.Elements[i];
                if (groupAdded.Equals(groupCore))
                {
                    return(true);
                }
            }

            return(false);
        }
예제 #3
0
 public static GroupCore Add(this CacheGroup container, GroupCore group)
 {
     ref var len     = ref container.length;
예제 #4
0
        public static bool TryGetValue(this CacheGroup container, Type t, Composition composition, out GroupCore group)
        {
            var len = container.length;

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

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

            group = default;
            return(false);
        }
예제 #5
0
 internal static void Add(this CacheGroup container, GroupCore group)
 {
     ref var len     = ref container.length;