mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-11-27 13:42:58 +08:00
feat: 移动图块添加使用默认帧数的接口
This commit is contained in:
parent
15f5282d8c
commit
42a7e15ed8
@ -256,6 +256,12 @@ export class MovingBlock extends DynamicBlockStatus implements IMovingBlock {
|
||||
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 {
|
||||
this.renderer.deleteMoving(this);
|
||||
}
|
||||
|
||||
@ -250,6 +250,11 @@ export interface IMovingBlock extends IBlockStatus {
|
||||
*/
|
||||
endMoving(): void;
|
||||
|
||||
/**
|
||||
* 使用图块默认帧数(如果图块存在的话)
|
||||
*/
|
||||
useDefaultFrame(): void;
|
||||
|
||||
/**
|
||||
* 摧毁这个移动图块对象,之后不会再显示到画面上
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user