updateLists() public method

public updateLists ( ) : void
return void
Example #1
0
        internal void update()
        {
            // we set the RenderTarget here so that the Viewport will match the RenderTarget properly
            Core.graphicsDevice.setRenderTarget(_sceneRenderTarget);

            // update our lists in case they have any changes
            entities.updateLists();

            if (entityProcessors != null)
            {
                entityProcessors.update();
            }

            for (int i = 0, count = entities.count; i < count; i++)
            {
                var entity = entities[i];
                if (entity.enabled && (entity.updateInterval == 1 || Time.frameCount % entity.updateInterval == 0))
                {
                    entity.update();
                }
            }

            if (entityProcessors != null)
            {
                entityProcessors.lateUpdate();
            }

            // we update our renderables after entity.update in case any new Renderables were added
            renderableComponents.updateLists();
        }
Example #2
0
        public virtual void update()
        {
            // we set the RenderTarget here so that the Viewport will match the RenderTarget properly
            Core.graphicsDevice.setRenderTarget(_sceneRenderTarget);

            // update our lists in case they have any changes
            entities.updateLists();

            // update our SceneComponents
            for (var i = _sceneComponents.length - 1; i >= 0; i--)
            {
                if (_sceneComponents.buffer[i].enabled)
                {
                    _sceneComponents.buffer[i].update();
                }
            }

            // update our EntityProcessors
            if (entityProcessors != null)
            {
                entityProcessors.update();
            }

            // update our Entities
            entities.update();

            if (entityProcessors != null)
            {
                entityProcessors.lateUpdate();
            }

            // we update our renderables after entity.update in case any new Renderables were added
            renderableComponents.updateLists();
        }
Example #3
0
File: Scene.cs Project: DoctorB/Nez
        internal void update()
        {
            // we set the RenderTarget here so that the Viewport will match the RenderTarget properly
            Core.graphicsDevice.SetRenderTarget(_sceneRenderTarget);

            // update our lists in case they have any changes
            entities.updateLists();
            renderableComponents.updateLists();

            if (entityProcessors != null)
            {
                entityProcessors.update();
            }

            for (var i = 0; i < entities.Count; i++)
            {
                var entity = entities[i];
                if (entity.enabled && (entity.updateInterval == 1 || Time.frameCount % entity.updateInterval == 0))
                {
                    entity.update();
                }
            }
        }