コード例 #1
0
        private void CalculateHashAndMask()
        {
            componentMask       = new BitSet256();
            sharedComponentMask = new BitSet256();
            _hash = 0;
            foreach (var kp in components)
            {
                _hash ^= kp.Key.GetHashCode();
                componentMask.Set(ComponentMask.GetComponentIndex(kp.Key));
            }

            foreach (var kp in sharedComponents)
            {
                _hash ^= kp.Key.GetHashCode();
                _hash ^= kp.Value.GetHashCode();
                sharedComponentMask.Set(SharedComponentMask.GetSharedComponentIndex(kp.Key));
            }
        }
コード例 #2
0
        public readonly bool DoesIncludeWrite(System.Type type)
        {
            int index = ComponentMask.GetComponentIndex(type);

            return(includeWriteMask.Get(index));
        }