main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
966 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import { Context } from '../Context.js';
|
---|
| 2 | import { Shape, ShapeConfig } from '../Shape.js';
|
---|
| 3 | import { Animation } from '../Animation.js';
|
---|
| 4 | import { GetSet } from '../types.js';
|
---|
| 5 | export interface SpriteConfig extends ShapeConfig {
|
---|
| 6 | animation: string;
|
---|
| 7 | animations: any;
|
---|
| 8 | frameIndex?: number;
|
---|
| 9 | image: HTMLImageElement;
|
---|
| 10 | frameRate?: number;
|
---|
| 11 | }
|
---|
| 12 | export declare class Sprite extends Shape<SpriteConfig> {
|
---|
| 13 | _updated: boolean;
|
---|
| 14 | anim: Animation;
|
---|
| 15 | interval: any;
|
---|
| 16 | constructor(config: SpriteConfig);
|
---|
| 17 | _sceneFunc(context: Context): void;
|
---|
| 18 | _hitFunc(context: Context): void;
|
---|
| 19 | _useBufferCanvas(): boolean;
|
---|
| 20 | _setInterval(): void;
|
---|
| 21 | start(): void;
|
---|
| 22 | stop(): void;
|
---|
| 23 | isRunning(): boolean;
|
---|
| 24 | _updateIndex(): void;
|
---|
| 25 | frameIndex: GetSet<number, this>;
|
---|
| 26 | animation: GetSet<string, this>;
|
---|
| 27 | image: GetSet<CanvasImageSource, this>;
|
---|
| 28 | animations: GetSet<any, this>;
|
---|
| 29 | frameOffsets: GetSet<any, this>;
|
---|
| 30 | frameRate: GetSet<number, this>;
|
---|
| 31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.