Sprite

Constructors

new

Sprite

()

Creates a new instance of the sprite


Properties

image

:

Surface

get set

Gets or sets an image of sprite

rect

:

Rect

get set

Gets or sets a draw rect of sprite


Methods

draw

(suface: Suface) ⇨ void

Draws the sprite on a suface

abstract create

() ⇨ Promise<void>

A method for the sprite initialization. Implementing in a child class

protected update

() ⇨ void

A method for the sprite update. Implementing in a child class