Skip to content

AnimatedSprite

Animated sprite

Extends

Constructors

new AnimatedSprite()

new AnimatedSprite(): AnimatedSprite

Creates an instance of animated sprite.

Returns

AnimatedSprite

Overrides

Sprite.constructor

Source

src/gameobjects/animation/AnimatedSprite.ts:20

Properties

editable

editable: boolean = true

Inherited from

Sprite.editable

Source

src/gameobjects/Sprite.ts:10


__dill_pixel_top_level_class

static __dill_pixel_top_level_class: boolean = true

Inherited from

Sprite.__dill_pixel_top_level_class

Source

src/gameobjects/Sprite.ts:9

Accessors

add

get add(): Add

Returns

Add

Source

src/gameobjects/Sprite.ts:49


app

get app(): T

Returns

T

Source

src/gameobjects/Sprite.ts:57


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

src/gameobjects/Sprite.ts:33


focusSize

get focusSize(): Point

set focusSize(value): void

Parameters

value: Point

Returns

Point

Source

src/gameobjects/Sprite.ts:41


focusable

get focusable(): boolean

set focusable(value): void

Parameters

value: boolean

Returns

boolean

Source

src/gameobjects/Sprite.ts:61


isPlaying

get isPlaying(): boolean

Gets whether is playing

Returns

boolean

Source

src/gameobjects/animation/AnimatedSprite.ts:33


make

get make(): typeof Make

Returns

typeof Make

Source

src/gameobjects/Sprite.ts:53

Methods

addAnimation()

addAnimation(key, spriteAnimation): SpriteAnimation

Adds animation

Parameters

key: string

spriteAnimation: SpriteAnimation

Returns

SpriteAnimation

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

Sprite.getFocusPosition

Source

src/gameobjects/Sprite.ts:69


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

Sprite.getFocusSize

Source

src/gameobjects/Sprite.ts:73


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

Sprite.isFocusable

Source

src/gameobjects/Sprite.ts:77


onFocusActivated()

onFocusActivated(): void

Called when this Focusable is focussed and then activated.

Returns

void

Inherited from

Sprite.onFocusActivated

Source

src/gameobjects/Sprite.ts:81


onFocusBegin()

onFocusBegin(): void

Called when this Focusable is focussed.

Returns

void

Inherited from

Sprite.onFocusBegin

Source

src/gameobjects/Sprite.ts:83


onFocusEnd()

onFocusEnd(): void

Called when this Focusable is no longer focussed.

Returns

void

Inherited from

Sprite.onFocusEnd

Source

src/gameobjects/Sprite.ts:85


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

Source

src/gameobjects/animation/AnimatedSprite.ts:108