Esempio n. 1
0
        /// <summary>
        /// Determines whether all of the bits in this instance are also set in the given Aspect.
        /// </summary>
        /// <param name="other">The Aspect to check.</param>
        /// <returns>
        /// <c>true</c> if all of the bits in this instance are set in <paramref name="aspectToTest"/>; otherwise, <c>false</c>.
        /// </returns>
        public bool IsSubsetOf(Aspect aspectToTest)
        {
            var tempSet = new Aspect(Masks.Length);

              for (int i = 0; i < Masks.Length; i++)
              {
            if (Masks[i] && (!(aspectToTest.Masks[i])))
            {
              return false;
            }
              }

              return true;
        }
Esempio n. 2
0
 public EntityHandle(Guid entity, int index, int aspectSize)
 {
     Aspect = new Aspect(aspectSize);
       Entity = entity;
       Index = index;
 }