Class Sprite

The Sprite class represents an image that can be drawn on the screen. It can be animated using a specified animation.

Constructors

Properties

animFrame: number = 0

The current frame of the animation.

animation?: Animation

The animation of the sprite.

entity: Entity

The entity that the sprite belongs to.

frameStart: number = ...

The start time of the frame.

then: number = ...

The current frame of the animation.

Methods