예제 #1
0
        public ECSManager()
        {
            m_entityManager    = new ECSEntityManager();
            m_componentManager = new ECSComponentManager();
            m_systemManager    = new ECSSystemManager();

            m_queryManager = new ECSQueryManager(m_componentManager, m_entityManager);

            m_systemManager.Initialize(m_queryManager, m_entityManager, m_componentManager);
        }
        public ECSQueryManager(ECSComponentManager componentManager, ECSEntityManager entityManager)
        {
            m_queries          = new Dictionary <Type[], Bag <int> >();
            m_componentManager = componentManager;
            m_entityManager    = entityManager;

            m_componentManager.OnComponentAdded       += OnComponentAdded;
            m_componentManager.OnComponentRemovedPost += OnComponentRemovedPost;
            m_entityManager.OnEntityDestroyedPre      += OnEntityDestroyedPre;
        }
 public void Initialize(ECSQueryManager queryManager, ECSEntityManager entityManager, ECSComponentManager componentManager)
 {
     m_queryManager     = queryManager;
     m_entityManager    = entityManager;
     m_componentManager = componentManager;
 }
예제 #4
0
 internal void Provide(ECSQueryManager queryManager, ECSEntityManager entityManager)
 {
     m_queryManager  = queryManager;
     m_entityManager = entityManager;
 }