コード例 #1
0
 public virtual void Update(float frameTime)
 {
     ProcessMessageBuffer();
     EntitySystemManager.Update(frameTime);
     _eventBus.ProcessEventQueue();
     CullDeletedEntities();
 }
コード例 #2
0
        public virtual void Update(float frameTime)
        {
            // for some 'special' reason entities require the map they are on to exist before they can
            // be initialized. This should stop the EntitySystems from updating over the uninitialized entities.
            if (MapsInitialized || _network.IsServer)
            {
                EntitySystemManager.Update(frameTime);

                // dispatching events to systems will usually cause them to interact
                // with entities, we don't want that to happen if the maps are not initialized.
                ProcessEventQueue();
            }

            CullDeletedEntities();
        }
コード例 #3
0
        public virtual void Update(float frameTime, Histogram?histogram)
        {
            using (histogram?.WithLabels("EntityNet").NewTimer())
            {
                EntityNetworkManager.Update();
            }

            using (histogram?.WithLabels("EntitySystems").NewTimer())
            {
                EntitySystemManager.Update(frameTime);
            }

            using (histogram?.WithLabels("EntityEventBus").NewTimer())
            {
                _eventBus.ProcessEventQueue();
            }

            using (histogram?.WithLabels("EntityCull").NewTimer())
            {
                CullDeletedEntities();
            }
        }
コード例 #4
0
 public virtual void Update(float frameTime)
 {
     EntitySystemManager.Update(frameTime);
     ProcessEventQueue();
     CullDeletedEntities();
 }