跳到主要内容

tick 执行周期回调函数

tick

类型: MethodDeclaration

所属类: Timer

定义位置: time.ts

描述

执行周期回调函数

参数 deltaTime: 增量时间(毫秒)

参数

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

返回值

类型: void

源代码

位置: 第 195 行

private tick(deltaTime: number): void {
this.elapsed = Math.min(this.elapsed + deltaTime, this.duration)
this.update(this)
if (this.elapsed === this.duration) {
this.callback(this)
this.remove()
}
}

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