react-simple-game-engine
Version:
[WIP] not able to use in currently. <!-- Document cumming soon... -->
28 lines • 1.05 kB
TypeScript
import { Avatar, Color } from "../../export-types";
import { AnimationSprite } from "../animations/animation";
import { Animator } from "../animations/animator";
import { Entity } from "../entities/entity";
import { LogicComponent } from "../logic-component";
export declare type SourceType = Avatar | Color | undefined | null;
export declare type GetInitialParams<S extends Sprite<any> = any> = {
source?: S["source"];
animation?: LogicComponent<AnimationSprite> | LogicComponent<Animator>;
};
export declare abstract class Sprite<SpriteType extends SourceType> {
source: SpriteType;
private _entity;
private _width;
private _height;
private _animation?;
set animation(ani: AnimationSprite | Animator);
get animation(): AnimationSprite;
get animator(): Animator;
set entity(entity: Entity);
get entity(): Entity;
get width(): number;
get height(): number;
draw(): void;
abstract onDraw(): void;
initial(params?: GetInitialParams<this>): void;
}
//# sourceMappingURL=sprite.d.ts.map