fix type definition of animation functions
This commit is contained in:
parent
b616ce8cf2
commit
8f9127777e
|
|
@ -15,7 +15,7 @@ class AnimationHandle {
|
|||
this.speed = this._speed = 1.0;
|
||||
this._lastChange = null;
|
||||
this._lastChangeX = null;
|
||||
this._animationNaturalSpeed = animation.naturalSpeed;
|
||||
this._animationNaturalSpeed = animation.naturalSpeed || 1.0;
|
||||
}
|
||||
play(player, time) {
|
||||
if (this._lastChange === null) {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@ export class CompositeAnimation implements IAnimation {
|
|||
public play(player: PlayerObject, time: number): void;
|
||||
}
|
||||
|
||||
export const WalkAnimation: AnimationFn;
|
||||
export const RunningAnimation: AnimationFn;
|
||||
export const RotatingAnimation: AnimationFn;
|
||||
export const WalkingAnimation: AnimationFn & { naturalSpeed?: number };
|
||||
export const RunningAnimation: AnimationFn & { naturalSpeed?: number };
|
||||
export const RotatingAnimation: AnimationFn & { naturalSpeed?: number };
|
||||
|
|
|
|||
Loading…
Reference in New Issue