rp_10012/assets/Game/scripts/game/SpinAni.ts
TJH 097b967d78
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 43s
快速模式下spin按钮节奏调整,iconmsg数字间距调整,bigwin播放时停止bgm
2025-10-13 17:05:20 +08:00

35 lines
733 B
TypeScript

import { _decorator, CCInteger, Component, tween, Vec3, Node, Animation, Tween, Skeleton, sp } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('SpinAni')
export class SpinAni extends Component {
@property(sp.Skeleton)
private rotateSpine: sp.Skeleton = null;
onLoad() {
this.playIdleSpin()
}
private playIdleSpin() {
this.rotateSpine.timeScale = 1
this.rotateSpine.clearTracks()
this.rotateSpine.setAnimation(0, 'idle', true)
}
public startSpin(isFastSpin: boolean) {
this.rotateSpine.timeScale = isFastSpin ? 2 : 1
this.rotateSpine.setAnimation(0, 'Click', true)
}
public stopSpin() {
this.playIdleSpin();
}
}