Exemplo n.º 1
0
        public Dictionary <Entity, Bag <Component> > GetCurrentState()
        {
            Bag <Entity> entities = entityManager.GetActiveEntities();
            Dictionary <Entity, Bag <Component> > currentState = new Dictionary <Entity, Bag <Component> >();

            for (int i = 0, j = entities.Size(); i < j; i++)
            {
                Entity          e          = entities.Get(i);
                Bag <Component> components = e.GetComponents();
                currentState.Add(e, components);
            }
            return(currentState);
        }