SpriteComponent Class
Namespace: Stride.EngineAssembly: Stride.Engine.dll
[DataContract("SpriteComponent")]
[Display("Sprite", null, Expand = ExpandRule.Once)]
[DefaultEntityComponentRenderer(typeof(SpriteRenderProcessor))]
[ComponentOrder(10000)]
[ComponentCategory("Sprites")]
public sealed class SpriteComponent : ActivableEntityComponent, IIdentifiable
Name | Description | |
---|---|---|
Constructors | ||
SpriteComponent() | Creates a new instance of SpriteComponent |
|
Fields | ||
IgnoreDepth | Ignore the depth of other elements of the scene when rendering the sprite by disabling the depth test. |
|
IsAlphaCutoff | Discard pixels with low alpha value when rendering the sprite by performing alpha cut off test. |
|
SpriteType | The type of the sprite. |
|
Properties | ||
BlendMode | Discard pixels with low alpha value when rendering the sprite by performing alpha cut off test. |
|
Color | The color shade to apply on the sprite. |
|
CurrentFrame | Gets the current frame of the animation. |
|
CurrentSprite | Gets the current sprite. |
|
Intensity | The intensity by which the color is scaled. |
|
PremultipliedAlpha | Gets or sets a value indicating whether the sprite is a pre-multiplied alpha (default is true). |
|
RenderGroup | The render group for this component. |
|
Sampler | Specifies the texture sampling method to be used for this sprite |
|
SpriteProvider | The group of sprites associated to the component. |
|
Swizzle | Specifies the swizzle method for sampling (how to access and mix the color channels) |
Constructors
SpriteComponent()
Creates a new instance of SpriteComponent
public SpriteComponent()
Fields
IgnoreDepth
Ignore the depth of other elements of the scene when rendering the sprite by disabling the depth test.
[DataMember(60)]
[Display("Ignore Depth", null)]
public bool IgnoreDepth
Field Value
Type | Description |
---|---|
System.Boolean |
IsAlphaCutoff
Discard pixels with low alpha value when rendering the sprite by performing alpha cut off test.
[DataMember(65)]
[Display("Is Alpha Cutoff", null)]
public bool IsAlphaCutoff
Field Value
Type | Description |
---|---|
System.Boolean |
SpriteType
The type of the sprite.
[DataMember(10)]
[Display("Type", null)]
public SpriteType SpriteType
Field Value
Type | Description |
---|---|
SpriteType |
Properties
BlendMode
Discard pixels with low alpha value when rendering the sprite by performing alpha cut off test.
[DataMember(67)]
[Display("Blend mode", null)]
public SpriteBlend BlendMode { get; set; }
Property Value
Type | Description |
---|---|
SpriteBlend |
Color
The color shade to apply on the sprite.
[DataMember(40)]
[Display("Color", null)]
public Color4 Color { get; set; }
Property Value
Type | Description |
---|---|
Color4 |
CurrentFrame
Gets the current frame of the animation.
public int CurrentFrame { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
CurrentSprite
Gets the current sprite.
public Sprite CurrentSprite { get; }
Property Value
Type | Description |
---|---|
Sprite |
Intensity
The intensity by which the color is scaled.
[DataMember(42)]
[Display("Intensity", null)]
public float Intensity { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
PremultipliedAlpha
Gets or sets a value indicating whether the sprite is a pre-multiplied alpha (default is true).
[DataMember(50)]
public bool PremultipliedAlpha { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
RenderGroup
The render group for this component.
[DataMember(90)]
[Display("Render group", null)]
public RenderGroup RenderGroup { get; set; }
Property Value
Type | Description |
---|---|
RenderGroup |
Sampler
Specifies the texture sampling method to be used for this sprite
[DataMember(70)]
[Display("Sampler", null)]
public SpriteSampler Sampler { get; set; }
Property Value
Type | Description |
---|---|
SpriteSampler |
SpriteProvider
The group of sprites associated to the component.
[DataMember(5)]
[Display("Source", null)]
public ISpriteProvider SpriteProvider { get; set; }
Property Value
Type | Description |
---|---|
ISpriteProvider |
Swizzle
Specifies the swizzle method for sampling (how to access and mix the color channels)
[DataMember(80)]
[Display("Swizzle", null)]
public SwizzleMode Swizzle { get; set; }
Property Value
Type | Description |
---|---|
SwizzleMode |