跳到主要内容

deleteTexture 删除精灵图纹理

deleteTexture

类型: MethodDeclaration

所属类: AnimationPlayer

定义位置: animation.ts

描述

删除精灵图纹理

参数 spriteId: 精灵图ID

参数

参数名类型描述默认值
spriteIdstring--

返回值

类型: void

源代码

位置: 第 649 行

public deleteTexture(spriteId: string): void {
const {textures} = this
if (spriteId in textures) {
textures[spriteId]?.destroy()
delete textures[spriteId]
}
}

文档生成时间:2025/7/7 12:07:06