Exemple #1
0
        protected override void OnCreate()
        {
            purgedQuery = GetEntityQuery(new EntityQueryDesc {
                None = new [] {
                    ComponentType.ReadOnly <Dimensions>(), ComponentType.ReadOnly <MeshVertexData>(),
                    ComponentType.ReadOnly <TriangleIndexElement>()
                },
                All = new [] {
                    ComponentType.ReadOnly <MeshIndex>()
                }
            });

            meshCacheSystem = World.GetOrCreateSystem <MeshCacheSystem>();

            RequireForUpdate(purgedQuery);
        }
        protected override void OnCreate()
        {
            meshCacheSystem  = World.GetOrCreateSystem <MeshCacheSystem>();
            renderSortSystem = World.GetOrCreateSystem <RenderSortSystem>();

            orderedRenderQuery = GetEntityQuery(new EntityQueryDesc {
                All = new [] {
                    ComponentType.ReadOnly <RenderGroupID>(),
                    ComponentType.ReadOnly <RenderElement>()
                }
            });

            renderCmdQuery = GetEntityQuery(new EntityQueryDesc {
                All = new [] {
                    ComponentType.ReadOnly <RenderCommand>()
                }
            });

            textureBinQuery = GetEntityQuery(new EntityQueryDesc {
                All = new [] {
                    ComponentType.ReadOnly <TextureBin>()
                }
            });
        }