Nez.Matcher.isInterested C# (CSharp) Method

isInterested() public method

public isInterested ( System.Entity e ) : bool
e System.Entity
return bool
		public bool isInterested( Entity e )
		{
			return isInterested( e.componentBits );
		}

Same methods

Matcher::isInterested ( BitSet componentBits ) : bool

Usage Example

        public virtual void onChange(Entity entity)
        {
            var contains = _entities.Contains(entity);
            var interest = _matcher.isInterested(entity);

            if (interest && !contains)
            {
                add(entity);
            }
            else if (!interest && contains)
            {
                remove(entity);
            }
        }