API 参考actor 模块setTime 设置角色状态的时间On this pagesetTime 设置角色状态的时间setTime 类型: MethodDeclaration 所属类: State 定义位置: actor.ts 描述 设置角色状态的时间 参数 time: 持续时间(毫秒) 参数 参数名类型描述默认值timenumber-- 返回值 类型: void 源代码 位置: 第 4004 行 public setTime(time: number): void { if (time >= 0) { this.currentTime = time; this.duration = time; } } 文档生成时间:2026/2/1 16:51:38