Exemple #1
0
        public EntityOrderContainer RegisterOrder <TSys>(ElementTag tag, int index)
            where TSys : IComponentSystem
        {
            OrderSystemContainer ordering;

            if (!componentOrderIndex.TryGetValue(tag, out ordering))
            {
                ordering = new OrderSystemContainer();
                componentOrderIndex.Add(tag, ordering);
            }
            ordering.Add(typeof(TSys), index);

            return(this);
        }
Exemple #2
0
        public EntityOrderContainer RegisterOrder <TSys>(ElementTag tag)
        {
            OrderSystemContainer ordering;

            if (!componentOrderIndex.TryGetValue(tag, out ordering))
            {
                ordering = new OrderSystemContainer();
                componentOrderIndex.Add(tag, ordering);
            }
            var t = typeof(TSys);

            ordering.Add(t, IncrementSystemOrderIndex(t));

            return(this);
        }