duckengine
Version:
A 2D Game Engine for the web.
46 lines (45 loc) • 1.44 kB
TypeScript
import Sprite from '../gameobjects/sprite';
/**
* @class AnimationFrame
* @classdesc Creates a DuckEngine AnimationFrame
* @description The AnimationFrame Class. Holds information about what col and row to use for the Animation
* @since 2.0.0
*/
export default class AnimationFrame {
/**
* @memberof AnimationFrame
* @description The column of the AnimationFrame, sets the Sprite.currentCol to this when played
* @type number
* @since 2.0.0
*/
col: number;
/**
* @memberof AnimationFrame
* @description The row of the AnimationFrame, sets the Sprite.currentRow to this when played
* @type number
* @since 2.0.0
*/
row: number;
/**
* @memberof AnimationFrame
* @description The Sprite to modify the currentCol and currentRow of
* @type Sprite
* @since 2.0.0
*/
sprite: Sprite;
/**
* @constructor AnimationFrame
* @description Creates an AnimationFrame instance
* @param {number} col Column of the Frame
* @param {number} row Row of the Frame
* @param {Sprite} sprite Sprite to modify the currentCol and currentRow of
* @since 2.0.0
*/
constructor(col: number, row: number, sprite: Sprite);
/**
* @memberof AnimationFrame
* @description Sets the Sprite.currentCol to AnimationFrame.col and Sprite.currentRow to AnimationFrame.row
* @since 2.0.0
*/
set(): void;
}