4 using SiliconStudio.Core;
5 using SiliconStudio.Paradox.Effects;
6 using SiliconStudio.Paradox.EntityModel;
7 using SiliconStudio.Paradox.Games;
9 namespace SiliconStudio.
Paradox.Engine
14 internal class SpriteProcessor :
EntityProcessor<SpriteProcessor.AssociatedData>
18 public SpriteProcessor()
19 : base(new
PropertyKey[] { SpriteComponent.Key, TransformationComponent.Key })
23 protected internal override void OnSystemAdd()
25 renderSystem = Services.GetSafeServiceAs<
RenderSystem>();
28 public override void Draw(
GameTime gameTime)
33 foreach (var renderProcessor
in renderSystem.SpriteRenderProcessors)
35 renderProcessor.EntitiesToRender.Clear();
36 foreach (var entity
in enabledEntities.Keys)
37 renderProcessor.EntitiesToRender.Add(entity);
41 protected override AssociatedData GenerateAssociatedData(
Entity entity)
43 return new AssociatedData
45 SpriteComponent = entity.Get(SpriteComponent.Key),
46 TransformationComponent = entity.Get(TransformationComponent.Key),
Game entity. It usually aggregates multiple EntityComponent
TransformationComponent TransformationComponent
SpriteComponent SpriteComponent
Entity processor, triggered on various EntitySystem events such as Entity and Component additions and...
Add a Sprite to an Entity. It could be an animated sprite.
Current timing used for variable-step (real time) or fixed-step (game time) games.
Renders its RenderSystem.Pipeline, which will usually result in drawing all meshes, UI, etc...
A class that represents a tag propety.