feat: 支持武器奖励
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user