vertecs
Version:
A typescript entity-component-system framework
70 lines (55 loc) • 1.37 kB
text/typescript
import { Component } from "../core";
/**
* Represents an animation being played on an entity
*/
export default class Animation extends Component {
public constructor(
name: string,
duration: number,
repeat: number,
startTime: number
) {
super();
this.
this.
this.
this.
}
public get name(): string {
return this.
}
public set name(name: string) {
this.
this.
}
public get duration(): number {
return this.
}
public set duration(duration: number) {
this.
}
public get startTime(): number {
return this.
}
public set startTime(startTime: number) {
this.
}
public get repeat(): number {
return this.
}
public set repeat(repeat: number) {
this.
}
public clone(): Component {
return new Animation(
this.
this.
this.
Date.now()
);
}
}