跳到主要内容

updateVelocity 更新触发器速度分量

updateVelocity

类型: MethodDeclaration

所属类: Trigger

定义位置: trigger.ts

描述

更新触发器速度分量

返回值

类型: void

源代码

位置: 第 277 行

public updateVelocity(): void {
const cos = Math.cos(this.angle)
const sin = Math.sin(this.angle)
this.velocityX = this.speed * cos
this.velocityY = this.speed * sin
}

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