feat: 支持武器奖励

This commit is contained in:
richarjiang
2025-09-28 16:56:03 +08:00
parent 869a33431c
commit ad51ba1262
4 changed files with 760 additions and 239 deletions

View File

@@ -64,6 +64,7 @@ export class PlayerController extends Component {
}
this.initProps();
// this.showBonusPopup()
}
onDestroy() {
@@ -692,6 +693,18 @@ export class PlayerController extends Component {
// 添加弹窗出现动画
this.playBonusPopupAnimation();
// 监听领取按钮
const receiveButton = this.bonus.getChildByName('Receive');
const bonusWuqi = this.bonus.getChildByName('BonusWuqi');
const bonusAnim = this.bonus.getChildByName('BonusAnim');
console.log('this.bonus', this.bonus);
if (receiveButton) {
receiveButton.on('click', () => {
bonusAnim.active = false
bonusWuqi.active = true
}, this);
}
}
/**