calculateAnimDirection 计算触发器的动画方向
calculateAnimDirection
类型: MethodDeclaration
所属类: Trigger
定义位置: trigger.ts
描述
计算触发器的动画方向
返回值
类型: void
源代码
位置: 第 413 行
private calculateAnimDirection(): void {
const animation = this.animation!
// 设置默认动画方向为技能释放者的动画方向
if (!animation.casterDirSync) {
animation.casterDirSync = true
const casterDir = this.caster?.animation?.direction
if (typeof casterDir === 'number' && casterDir >= 0) {
animation.setDirection(casterDir)
}
}
// 设置触发器动画角度
animation.setAngle(this.angle)
}
文档生成时间:2025/7/7 12:07:06