示例#1
0
        protected virtual void Start()
        {
            Family   = Engine.FamilyManager.Get(new ConstituentTypes(Types));
            Entities = Family.Entities;

            Entities.ItemAdded   += (source, item) => OnEntityAdded((Entity)item);
            Entities.ItemRemoved += (source, item) => OnEntityRemoved((Entity)item);

            Started = true;
        }
示例#2
0
        public static void ForEach <T>(this IObservableLinkedList <T> source, Action <T> action)
        {
            var node = source.First;

            while (node != null)
            {
                action(node.Value);
                node = node.Next;
            }
        }