| Package | PBLabs.Rendering2D |
| Class | public class SpriteRenderComponent |
| Inheritance | SpriteRenderComponent BaseRenderComponent EntityComponent |
| Property | Defined by | ||
|---|---|---|---|
| Fade : Number = 1.0
Modulate alpha.
| SpriteRenderComponent | ||
| FlipX : Boolean
Whether or not to flip the sprite about the x axis.
| SpriteRenderComponent | ||
| FlipY : Boolean
Whether or not to flip the sprite about the y axis.
| SpriteRenderComponent | ||
![]() | IsRegistered : Boolean
Whether or not the component is currently registered with an entity.
| EntityComponent | |
![]() | LayerIndex : int
Objects are sorted by layer, and this is the index of this object's layer.
| BaseRenderComponent | |
![]() | Name : String
The name given to the component when it is added to an entity.
| EntityComponent | |
![]() | Owner : IEntity
A reference to the entity that this component currently belongs to.
| EntityComponent | |
![]() | PositionOffset : Point
An offset to apply to the position retrieved from the PositionReference.
| BaseRenderComponent | |
![]() | PositionReference : PropertyReference
A reference for the position property on the owner entity.
| BaseRenderComponent | |
| RawSprite : DisplayObject [read-only]
| SpriteRenderComponent | ||
![]() | RenderCacheKey : int | BaseRenderComponent | |
![]() | RenderPosition : Point
Report the center position of this object as used for rendering.
| BaseRenderComponent | |
![]() | RenderScale : Point | BaseRenderComponent | |
![]() | RenderSortKey : int
Expose a sort key.
| BaseRenderComponent | |
![]() | RotationReference : PropertyReference
A reference for the rotation property on the owner entity.
| BaseRenderComponent | |
![]() | SizeReference : PropertyReference
A reference for the size property on the owner entity.
| BaseRenderComponent | |
| Smoothing : Boolean | SpriteRenderComponent | ||
| SpriteIndex : int
The index in the sprite sheet of the frame to draw.
| SpriteRenderComponent | ||
| SpriteSheet : SpriteSheetComponent
The sprite sheet to use to draw this sprite.
| SpriteRenderComponent | ||
| Property | Defined by | ||
|---|---|---|---|
| _baseSize : Point = null | SpriteRenderComponent | ||
| _flipX : Boolean = false | SpriteRenderComponent | ||
| _flipY : Boolean = false | SpriteRenderComponent | ||
| _matrix : Matrix | SpriteRenderComponent | ||
| _smoothing : Boolean = true | SpriteRenderComponent | ||
| _sprite : DisplayObject = null | SpriteRenderComponent | ||
| _spriteDirty : Boolean = false | SpriteRenderComponent | ||
| _spriteIndex : int = 0 | SpriteRenderComponent | ||
| _spriteSheet : SpriteSheetComponent = null | SpriteRenderComponent | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
InvalidateRenderCache():void
| BaseRenderComponent | |
|
OnDraw(manager:IDrawManager2D):void
Callback during rendering to give the object an opportunity to give the
IDrawManager2D stuff to display.
| SpriteRenderComponent | ||
![]() |
Registers the component with an entity.
| EntityComponent | |
![]() |
Reset():void
This is called by an entity on all of its components any time a component
is added or removed.
| EntityComponent | |
![]() |
Unregister():void
Unregisters the component from an entity.
| EntityComponent | |
| Method | Defined by | ||
|---|---|---|---|
|
_GenerateSprite():void
Update the cached sprite that we use for rendering.
| SpriteRenderComponent | ||
|
_OnAdd():void
This is called when the component is added to an entity.
| SpriteRenderComponent | ||
|
_OnRemove():void
This is called when the component is removed from an entity.
| SpriteRenderComponent | ||
![]() |
_OnReset():void
This is called anytime a component is added or removed from the owner entity.
| EntityComponent | |
|
GetCurrentFrame():BitmapData
| SpriteRenderComponent | ||
| _baseSize | property |
protected var _baseSize:Point = null
| Fade | property |
public var Fade:Number = 1.0Modulate alpha. Zero is fully translucent, one is fully opaque.
| _flipX | property |
protected var _flipX:Boolean = false
| FlipX | property |
FlipX:Boolean [read-write]Whether or not to flip the sprite about the x axis.
Implementation public function get FlipX():Boolean
public function set FlipX(value:Boolean):void
| _flipY | property |
protected var _flipY:Boolean = false
| FlipY | property |
FlipY:Boolean [read-write]Whether or not to flip the sprite about the y axis.
Implementation public function get FlipY():Boolean
public function set FlipY(value:Boolean):void
| _matrix | property |
protected var _matrix:Matrix
| RawSprite | property |
RawSprite:DisplayObject [read-only]Implementation
public function get RawSprite():DisplayObject
| _smoothing | property |
protected var _smoothing:Boolean = true
| Smoothing | property |
Smoothing:Boolean [read-write]Implementation
public function get Smoothing():Boolean
public function set Smoothing(value:Boolean):void
| _sprite | property |
protected var _sprite:DisplayObject = null
| _spriteDirty | property |
protected var _spriteDirty:Boolean = false
| _spriteIndex | property |
protected var _spriteIndex:int = 0
| SpriteIndex | property |
SpriteIndex:int [read-write]The index in the sprite sheet of the frame to draw.
Implementation public function get SpriteIndex():int
public function set SpriteIndex(value:int):void
| _spriteSheet | property |
protected var _spriteSheet:SpriteSheetComponent = null
| SpriteSheet | property |
SpriteSheet:SpriteSheetComponent [read-write]The sprite sheet to use to draw this sprite.
Implementation public function get SpriteSheet():SpriteSheetComponent
public function set SpriteSheet(value:SpriteSheetComponent):void
| _GenerateSprite | () | method |
protected function _GenerateSprite():voidUpdate the cached sprite that we use for rendering.
| _OnAdd | () | method |
protected override function _OnAdd():voidThis is called when the component is added to an entity. Any initialization, event registration, or object lookups should happen here. Component lookups on the owner entity should NOT happen here. Use _OnReset instead.
| _OnRemove | () | method |
protected override function _OnRemove():voidThis is called when the component is removed from an entity. It should reverse anything that happened in _OnAdd or _OnReset (like removing event listeners or nulling object references).
| GetCurrentFrame | () | method |
protected function GetCurrentFrame():BitmapData
Returns
BitmapData |
| OnDraw | () | method |
public override function OnDraw(manager:IDrawManager2D):voidCallback during rendering to give the object an opportunity to give the IDrawManager2D stuff to display.
Parametersmanager:IDrawManager2D |