Skip to main content

setPosition 设置触发器位置

setPosition

类型: MethodDeclaration

所属类: Trigger

定义位置: trigger.ts

描述

设置触发器位置

参数 x: 水平位置

参数 y: 垂直位置

参数

参数名类型描述默认值
xnumber--
ynumber--

返回值

类型: void

源代码

位置: 第 240 行

public setPosition(x: number, y: number): void {
this.x = x
this.y = y
this.lastX = x
this.lastY = y
}

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