protected override void OnCreate()
 {
     spriteRenderingSystem = World.GetExistingSystem <SpriteRenderingSystem>();
     query = GetEntityQuery(ComponentType.ReadOnly <SpriteRenderSubject>(),
                            ComponentType.ReadOnly <SpriteSheetPointer>(),
                            ComponentType.Exclude <BufferedRenderSubjectTag>());
 }
 protected override void OnCreate()
 {
     query_Matrix = GetEntityQuery(ComponentType.ReadOnly <SpriteMatrix>(),
                                   ComponentType.ChunkComponentReadOnly <SpriteMatrixChangeTag>(),
                                   ComponentType.ReadOnly <SpriteSheetPointer>(),
                                   ComponentType.ReadOnly <SpriteRenderSubject>(),
                                   ComponentType.ReadOnly <BufferedRenderSubjectTag>());
     query_Color = GetEntityQuery(ComponentType.ReadOnly <SpriteColor>(),
                                  ComponentType.ReadOnly <SpriteSheetPointer>(),
                                  ComponentType.ReadOnly <SpriteRenderSubject>(),
                                  ComponentType.ReadOnly <BufferedRenderSubjectTag>());
     query_Index = GetEntityQuery(ComponentType.ReadOnly <SpriteRenderSubject>(),
                                  ComponentType.ReadOnly <SpriteSheetPointer>(),
                                  ComponentType.ReadOnly <BufferedRenderSubjectTag>());
     renderingSystem = World.GetExistingSystem <SpriteRenderingSystem>();
 }
示例#3
0
 protected override void OnCreate()
 {
     srs = World.GetExistingSystem <SpriteRenderingSystem>();
     if (UseLocalToWorldInsteadOfTranslation)
     {
         query = GetEntityQuery(
             ComponentType.ReadOnly <LocalToWorld>(),
             ComponentType.ReadOnly <Scale>(),
             ComponentType.ReadOnly <Rotation2D>(),
             ComponentType.ChunkComponentReadOnly <SpriteMatrixChangeTag>(),
             ComponentType.ReadWrite <SpriteMatrix>(),
             ComponentType.ReadOnly <BufferedRenderSubjectTag>());
     }
     else
     {
         query = GetEntityQuery(
             ComponentType.ReadOnly <Translation>(),
             ComponentType.ReadOnly <Scale>(),
             ComponentType.ReadOnly <Rotation2D>(),
             ComponentType.ChunkComponentReadOnly <SpriteMatrixChangeTag>(),
             ComponentType.ReadWrite <SpriteMatrix>(),
             ComponentType.ReadOnly <BufferedRenderSubjectTag>());
     }
 }