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

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f29bbed3-ea23-4394-90a6-5bb2b21c61db",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f29bbed3-ea23-4394-90a6-5bb2b21c61db@6c48a",
"displayName": "BonusWuqi",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f29bbed3-ea23-4394-90a6-5bb2b21c61db",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "f29bbed3-ea23-4394-90a6-5bb2b21c61db@f9941",
"displayName": "BonusWuqi",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 11.5,
"offsetY": -8,
"trimX": 50,
"trimY": 80,
"width": 563,
"height": 992,
"rawWidth": 640,
"rawHeight": 1136,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-281.5,
-496,
0,
281.5,
-496,
0,
-281.5,
496,
0,
281.5,
496,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
50,
1056,
613,
1056,
50,
64,
613,
64
],
"nuv": [
0.078125,
0.056338028169014086,
0.9578125,
0.056338028169014086,
0.078125,
0.9295774647887324,
0.9578125,
0.9295774647887324
],
"minPos": [
-281.5,
-496,
0
],
"maxPos": [
281.5,
496,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f29bbed3-ea23-4394-90a6-5bb2b21c61db@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "f29bbed3-ea23-4394-90a6-5bb2b21c61db@6c48a"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -64,6 +64,7 @@ export class PlayerController extends Component {
} }
this.initProps(); this.initProps();
// this.showBonusPopup()
} }
onDestroy() { onDestroy() {
@@ -692,6 +693,18 @@ export class PlayerController extends Component {
// 添加弹窗出现动画 // 添加弹窗出现动画
this.playBonusPopupAnimation(); 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);
}
} }
/** /**