feat: 移动图块添加使用默认帧数的接口

This commit is contained in:
unanmed 2025-11-25 23:59:08 +08:00
parent 15f5282d8c
commit 42a7e15ed8
2 changed files with 11 additions and 0 deletions

View File

@ -256,6 +256,12 @@ export class MovingBlock extends DynamicBlockStatus implements IMovingBlock {
this.posUpdated = true; this.posUpdated = true;
} }
useDefaultFrame(): void {
if (!this.renderer.manager.getTile(this.tile)) return;
const defaultFrame = this.renderer.manager.getDefaultFrame(this.tile);
this.useSpecifiedFrame(defaultFrame);
}
destroy(): void { destroy(): void {
this.renderer.deleteMoving(this); this.renderer.deleteMoving(this);
} }

View File

@ -250,6 +250,11 @@ export interface IMovingBlock extends IBlockStatus {
*/ */
endMoving(): void; endMoving(): void;
/**
* 使
*/
useDefaultFrame(): void;
/** /**
* *
*/ */