Spring774
2025-10-30 a972605e1cf8122330de5b6ff53857be130972be
assets/Script/RewardLayer.ts
@@ -17,9 +17,11 @@
    eventNode: cc.Node = null;
    onClickClose() {
        Global.debounceClicks(() => {
        SoundManager.playButton();
        this.cliamReward(1);
        this.hide();
        }, 'RewardLayer-onClickClose');
    }
    hide() {
@@ -49,6 +51,7 @@
    }
    onClickCliam() {
        Global.debounceClicks(() => {
        SoundManager.playButton();
        if (this.isGot) {
@@ -68,15 +71,18 @@
        } else {
            Sdk.ins.showVideoAd((res) => {
                if (res) {
                        if (!this.isGot) {
                    this.isGot = true;
                    this.cliamReward(5);
                    this.hide();
                        }
                } else {
                    Global.showTip('No ads ready!!');
                        Global.showTip('广告展示失败, 请稍后重试!!');
                        // Global.showTip('No ads ready!!');
                }
            });
        }
        }, 'RewardLayer-onClickCliam');
    }
}