auto和turbo动画修改
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 44s

This commit is contained in:
TJH 2025-11-05 14:23:33 +08:00
parent 88d328561e
commit 60a700a544

View File

@ -117,13 +117,15 @@ export class SlotBar extends Component {
if (node) this.btnPositions.set(name, node.position.clone()); if (node) this.btnPositions.set(name, node.position.clone());
}); });
let auto_mouse_enter = this.autoBtn.getChildByName('AutoSpinGear') this.autoBtn.getChildByName('AutoSpinGear').on(Node.EventType.MOUSE_ENTER, () => {
let turbo_mouse_enter = this.turboBtn.getChildByName('TurboEffect') if (!this.isAuto) {
auto_mouse_enter.on(Node.EventType.MOUSE_ENTER, () => { this.autoBtnAni.play('autoSpin_Hover_animation');
this.autoBtnAni.play('autoSpin_Pressed_animation'); }
}, this) }, this)
turbo_mouse_enter.on(Node.EventType.MOUSE_ENTER, () => { this.turboBtn.getChildByName('TurboEffect').on(Node.EventType.MOUSE_ENTER, () => {
this.turboBtnAni.play('turbo_Pressed_animation'); if (!this.isFastSpin) {
this.turboBtnAni.play('turbo_Hover_animation');
}
}, this) }, this)
} }
@ -131,10 +133,8 @@ export class SlotBar extends Component {
protected onDestroy(): void { protected onDestroy(): void {
this.node.targetOff(this); this.node.targetOff(this);
let auto_mouse_enter = this.autoBtn.getChildByName('AutoSpinGear') this.autoBtn.getChildByName('AutoSpinGear').targetOff(this)
auto_mouse_enter.targetOff(this) this.turboBtn.getChildByName('TurboEffect').targetOff(this)
let turbo_mouse_enter = this.turboBtn.getChildByName('AutoSpinGear')
turbo_mouse_enter.targetOff(this)
} }