Skip to main content

loadSubscene 加载子场景

loadSubscene

类型: MethodDeclaration

所属类: CommandFunctionList

定义位置: command.ts

描述

加载子场景

参数

参数名类型描述默认值
\{sceneId, shiftX, shiftY\}`{
sceneId: string
shiftX: number
shiftY: number
}`--

返回值

类型: CommandFunction

源代码

位置: 第 7222 行

protected loadSubscene({sceneId, shiftX, shiftY}: {
sceneId: string
shiftX: number
shiftY: number
}): CommandFunction {
const getSceneId = Command.compileString(sceneId)
const getShiftX = Command.compileNumber(shiftX)
const getShiftY = Command.compileNumber(shiftY)
return () => {
Scene.binding?.loadSubscene(
getSceneId(),
Math.floor(getShiftX()),
Math.floor(getShiftY()),
)
return true
}
}

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