Example #1
0
        public void OnComponentAdded(Entity entity, object component)
        {
            if (!ConstituentTypes.Contains(component.GetType()))
            {
                return;
            }

            AddIfMatch(entity);
        }
Example #2
0
        public void OnComponentRemoved(Entity entity, object component)
        {
            //If the component isn't important, ignore it
            if (!ConstituentTypes.Contains(component.GetType()))
            {
                return;
            }

            //If it was, remove it
            Remove(entity);
        }