Draw sprites in batch to reduce number of draw calls, state setup etc. More...
Public Member Functions | |
| RawSpriteTileList (TextureInfo texture_info) | |
| RawSpriteTileList constructor. | |
| override void | Draw () |
| The draw function, draws all sprites in Sprites list. | |
| Vector2 | CalcSizeInPixels () |
| Based on the tile size and texture dimensions, return the corresponding size in pixels. | |
Public Attributes | |
| List< RawSpriteTile > | Sprites = new List< RawSpriteTile >() |
| The list of RawSpriteTile objects to render. | |
| Vector4 | Color = Colors.White |
| The color that will be used for all sprites in the Children list. | |
| BlendMode | BlendMode = BlendMode.Normal |
| The blend mode that will be used for all sprites in the Children list. | |
| TextureInfo | TextureInfo |
| The TextureInfo object that will be used for all sprites in the Children list. | |
| SpriteRenderer.ISpriteShader | Shader = (SpriteRenderer.ISpriteShader)Director.Instance.SpriteRenderer.DefaultShader |
| The shader that will be used for all sprites in the Children list. | |
Draw sprites in batch to reduce number of draw calls, state setup etc.
Unlike SpriteList, instead of holding a list of Node objects, this holds a list of RawSpriteTile, which is more lightweight. In effect this is a thin wrap of SpriteRenderer, usable as a Node.
| RawSpriteTileList | ( | TextureInfo | texture_info | ) |
RawSpriteTileList constructor.
TextureInfo must be specified in constructor since there is no default for it.
| Vector2 CalcSizeInPixels | ( | ) |
Based on the tile size and texture dimensions, return the corresponding size in pixels.
For example you might want to do something like bob.Quad.S = bob.CalcSizeInPixels().