Class SpriteComponent
[DataContract("SpriteComponent")]
[Display("Sprite", null, Expand = ExpandRule.Once)]
[DefaultEntityComponentRenderer(typeof(SpriteRenderProcessor))]
[ComponentOrder(10000)]
[ComponentCategory("Sprites")]
public sealed class SpriteComponent : ActivableEntityComponent, IIdentifiable
- Inheritance
-
SpriteComponent
- Implements
- Inherited Members
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
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
SpriteType
The type of the sprite.
[DataMember(10)]
[Display("Type", null)]
public SpriteType SpriteType
Field Value
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
Color
The color shade to apply on the sprite.
[DataMember(40)]
[Display("Color", null)]
public Color4 Color { get; set; }
Property Value
CurrentFrame
Gets the current frame of the animation.
public int CurrentFrame { get; }
Property Value
CurrentSprite
Gets the current sprite.
public Sprite CurrentSprite { get; }
Property Value
Intensity
The intensity by which the color is scaled.
[DataMember(42)]
[Display("Intensity", null)]
public float Intensity { get; set; }
Property Value
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
- bool
true
if the texture is pre-multiplied by alpha; otherwise,false
.
RenderGroup
The render group for this component.
[DataMember(90)]
[Display("Render group", null)]
public RenderGroup RenderGroup { get; set; }
Property Value
Sampler
Specifies the texture sampling method to be used for this sprite
[DataMember(70)]
[Display("Sampler", null)]
public SpriteSampler Sampler { get; set; }
Property Value
SpriteProvider
The group of sprites associated to the component.
[DataMember(5)]
[Display("Source", null)]
public ISpriteProvider SpriteProvider { get; set; }
Property Value
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; }