AnimatedSprite
Animated sprite
Extends
Constructors
new AnimatedSprite()
new AnimatedSprite():
AnimatedSprite
Creates an instance of animated sprite.
Returns
Overrides
Source
src/gameobjects/animation/AnimatedSprite.ts:20
Properties
editable
editable:
boolean
=true
Inherited from
Source
__dill_pixel_top_level_class
static
__dill_pixel_top_level_class:boolean
=true
Inherited from
Sprite
.__dill_pixel_top_level_class
Source
Accessors
add
get
add():Add
Returns
Source
app
get
app():T
Returns
T
Source
currentFrame
get
currentFrame():number
set
currentFrame(frame
):void
Parameters
• frame: number
Returns
number
Source
src/gameobjects/animation/AnimatedSprite.ts:37
focusPosition
get
focusPosition():Point
set
focusPosition(value
):void
Parameters
• value: Point
Returns
Point
Source
focusSize
get
focusSize():Point
set
focusSize(value
):void
Parameters
• value: Point
Returns
Point
Source
focusable
get
focusable():boolean
set
focusable(value
):void
Parameters
• value: boolean
Returns
boolean
Source
isPlaying
get
isPlaying():boolean
Gets whether is playing
Returns
boolean
Source
src/gameobjects/animation/AnimatedSprite.ts:33
make
get
make(): typeofMake
Returns
typeof Make
Source
Methods
addAnimation()
addAnimation(
key
,spriteAnimation
):SpriteAnimation
Adds animation
Parameters
• key: string
• spriteAnimation: SpriteAnimation
Returns
animation
Source
src/gameobjects/animation/AnimatedSprite.ts:63
getFocusPosition()
getFocusPosition():
Point
Gets the position in global coordinate space that the focus should be centred around.
Returns
Point
The position that the focus should be centred around.
Inherited from
Source
getFocusSize()
getFocusSize():
IPoint
Gets the size of the area in global coordinate space that the focus should surround.
Returns
IPoint
The size of the area that the focus should surround.
Inherited from
Source
holdFrame()
holdFrame(
key
,frame
):void
Holds frame
Parameters
• key: string
• frame: number
= 0
Returns
void
Source
src/gameobjects/animation/AnimatedSprite.ts:91
isFocusable()
isFocusable():
boolean
Returns
boolean
true if this focusable can be focused Defaults to this.interactive && this.worldVisible
Inherited from
Source
onFocusActivated()
onFocusActivated():
void
Called when this Focusable is focussed and then activated.
Returns
void
Inherited from
Source
onFocusBegin()
onFocusBegin():
void
Called when this Focusable is focussed.
Returns
void
Inherited from
Source
onFocusEnd()
onFocusEnd():
void
Called when this Focusable is no longer focussed.
Returns
void
Inherited from
Source
play()
play(
key
,reverse
,startingFrame
):void
Plays animated sprite
Parameters
• key: string
• reverse: boolean
= false
• startingFrame: number
= 0
Returns
void
Source
src/gameobjects/animation/AnimatedSprite.ts:74
update()
update(
deltaTime
):void
Updates animated sprite
Parameters
• deltaTime: number
Returns
void