mirror of
https://github.com/motajs/template.git
synced 2026-10-16 10:30:18 +08:00
feat: 移动器新增 push 方法
This commit is contained in:
parent
ef58f79518
commit
b86a060759
@ -330,6 +330,12 @@ export interface IObjectMover<T extends IObjectMovable> extends IHookable<
|
||||
*/
|
||||
animDir(dir: ObjectAnimDirection): this;
|
||||
|
||||
/**
|
||||
* 直接在当前的移动规划后追加新的移动步
|
||||
* @param steps 要追加的移动步
|
||||
*/
|
||||
push(steps: ObjectMoveStep[]): this;
|
||||
|
||||
/**
|
||||
* 清空尚未执行的步骤队列
|
||||
*/
|
||||
@ -614,6 +620,11 @@ export abstract class ObjectMover<T extends IObjectMovable>
|
||||
return this;
|
||||
}
|
||||
|
||||
push(steps: ObjectMoveStep[]): this {
|
||||
this.moveQueue.push(...steps);
|
||||
return this;
|
||||
}
|
||||
|
||||
clear(): this {
|
||||
this.moveQueue.length = 0;
|
||||
return this;
|
||||
|
||||
@ -9,8 +9,8 @@ import {
|
||||
} from './type';
|
||||
|
||||
export interface BuiltInFunction<
|
||||
P extends Record<string, any>,
|
||||
E extends Record<string, any>
|
||||
P extends Record<string, any> = any,
|
||||
E extends Record<string, any> = any
|
||||
> {
|
||||
name: string;
|
||||
save?: boolean;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user