예제 #1
0
        internal void AddEntityOwner(EntityOwner owner)
        {
            if (_ownersCount == _owners.Length)
            {
                Array.Resize(ref _owners, _ownersCount << 1);
            }

            _owners[_ownersCount++] = owner;
        }
예제 #2
0
        internal void AddPipelineContext(PipelineContext context, EntityOwner owner)
        {
            if (_contextCount == _contexts.Length)
            {
                Array.Resize(ref _contexts, _contextCount << 1);
            }
            _contexts[_contextCount++] = context;

            _supervisor.AddEntityOwner(owner);
        }
예제 #3
0
 public PipelineContext(Domain domain, bool isActive = true, string name = null)
 {
     TypeIndex      = Internals.EcpHelpers.ContextCount++;
     _entityManager = new EntityManager(domain.GetSupervisor(), TypeIndex);
     _isActive      = isActive;
     _domain        = domain;
     _containerPool = domain.GetContainerPool();
     _entityOwner   = new EntityOwner();
     _domain.AddPipelineContext(this, _entityOwner);
     AddContainers();
 }