humingxing 3 days ago
commit 6bf9e9737b
  1. 1732
      assets/bundles/battleGame/prefab/BattleGame.prefab
  2. 2
      assets/bundles/popBattle/battleGameResult/prefab/BattleFail.prefab
  3. BIN
      assets/res/battleGame/texture/ui/召唤icon.png
  4. 134
      assets/res/battleGame/texture/ui/召唤icon.png.meta
  5. BIN
      assets/res/battleGame/texture/ui/召唤按钮-亮色.png
  6. 134
      assets/res/battleGame/texture/ui/召唤按钮-亮色.png.meta
  7. BIN
      assets/res/battleGame/texture/ui/召唤按钮-暗色.png
  8. 134
      assets/res/battleGame/texture/ui/召唤按钮-暗色.png.meta
  9. BIN
      assets/res/battleGame/texture/ui/召唤按钮-橙灰.png
  10. 134
      assets/res/battleGame/texture/ui/召唤按钮-橙灰.png.meta
  11. 35
      assets/script/ui/BattleGame/UIBattleGame.ts

File diff suppressed because it is too large Load Diff

@ -2320,7 +2320,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 640,
"width": 600,
"height": 10
},
"_anchorPoint": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

@ -1,134 +0,0 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "95339c7d-4211-4d61-994e-276be03485c6",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "95339c7d-4211-4d61-994e-276be03485c6@6c48a",
"displayName": "召唤icon",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "95339c7d-4211-4d61-994e-276be03485c6",
"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": "95339c7d-4211-4d61-994e-276be03485c6@f9941",
"displayName": "召唤icon",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 48,
"height": 49,
"rawWidth": 48,
"rawHeight": 49,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-24,
-24.5,
0,
24,
-24.5,
0,
-24,
24.5,
0,
24,
24.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
49,
48,
49,
0,
0,
48,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-24,
-24.5,
0
],
"maxPos": [
24,
24.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "95339c7d-4211-4d61-994e-276be03485c6@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "95339c7d-4211-4d61-994e-276be03485c6@6c48a"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

@ -1,134 +0,0 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f769484a-5719-4d9e-a862-223c5a7e2aed",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f769484a-5719-4d9e-a862-223c5a7e2aed@6c48a",
"displayName": "召唤按钮-亮色",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f769484a-5719-4d9e-a862-223c5a7e2aed",
"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": "f769484a-5719-4d9e-a862-223c5a7e2aed@f9941",
"displayName": "召唤按钮-亮色",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 165,
"height": 87,
"rawWidth": 165,
"rawHeight": 87,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-82.5,
-43.5,
0,
82.5,
-43.5,
0,
-82.5,
43.5,
0,
82.5,
43.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
87,
165,
87,
0,
0,
165,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-82.5,
-43.5,
0
],
"maxPos": [
82.5,
43.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f769484a-5719-4d9e-a862-223c5a7e2aed@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "f769484a-5719-4d9e-a862-223c5a7e2aed@6c48a"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

@ -1,134 +0,0 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "35f0a7c9-87e4-45bf-966c-53b46a0fdbef",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "35f0a7c9-87e4-45bf-966c-53b46a0fdbef@6c48a",
"displayName": "召唤按钮-暗色",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "35f0a7c9-87e4-45bf-966c-53b46a0fdbef",
"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": "35f0a7c9-87e4-45bf-966c-53b46a0fdbef@f9941",
"displayName": "召唤按钮-暗色",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 165,
"height": 87,
"rawWidth": 165,
"rawHeight": 87,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-82.5,
-43.5,
0,
82.5,
-43.5,
0,
-82.5,
43.5,
0,
82.5,
43.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
87,
165,
87,
0,
0,
165,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-82.5,
-43.5,
0
],
"maxPos": [
82.5,
43.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "35f0a7c9-87e4-45bf-966c-53b46a0fdbef@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "35f0a7c9-87e4-45bf-966c-53b46a0fdbef@6c48a"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

@ -1,134 +0,0 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "58f3d519-fd0a-484c-947b-79a5b1f74307",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "58f3d519-fd0a-484c-947b-79a5b1f74307@6c48a",
"displayName": "召唤按钮-橙灰",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "58f3d519-fd0a-484c-947b-79a5b1f74307",
"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": "58f3d519-fd0a-484c-947b-79a5b1f74307@f9941",
"displayName": "召唤按钮-橙灰",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 165,
"height": 87,
"rawWidth": 165,
"rawHeight": 87,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-82.5,
-43.5,
0,
82.5,
-43.5,
0,
-82.5,
43.5,
0,
82.5,
43.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
87,
165,
87,
0,
0,
165,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-82.5,
-43.5,
0
],
"maxPos": [
82.5,
43.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "58f3d519-fd0a-484c-947b-79a5b1f74307@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "58f3d519-fd0a-484c-947b-79a5b1f74307@6c48a"
}
}

@ -4,7 +4,7 @@
// time: Tue Aug 18 2026
// desc: 战斗界面 — 地图、出怪、背包刷新(召唤)
//*********************
import { _decorator, find, game, Label, Node, Tween, tween, v3, Vec3, sp } from 'cc';
import { _decorator, find, game, Label, Node, Sprite, Tween, tween, v3, Vec3, sp } from 'cc';
import { Auto_BattleGame } from './Auto_BattleGame';
import { CocosBattleMapHost } from '../../battle/map/CocosBattleMapHost';
import { applyMapTopologyToSession } from '../../battle/map/importTopologyFromMapManager';
@ -266,7 +266,7 @@ export class UIBattleGame extends Auto_BattleGame {
this._ensureOwnedDesc();
this._ensureOtherOwnedDesc();
this._linkSkillDescPeers();
this._showRefreshBg1();
this._showRefreshBg1(this._isRefreshGoldEnough());
this._disableRefreshBreathe();
this.btnRefresh?.getScale(this._refreshBtnScaleHome);
this._lbWaveTip = this.ui_nextWaveTime?.getChildByName('lb1')?.getComponent(Label) ?? null;
@ -1064,8 +1064,8 @@ export class UIBattleGame extends Auto_BattleGame {
if (this.lb_RefreshNeed?.isValid) {
this.lb_RefreshNeed.string = `${cost}`;
}
this._showRefreshBg1();
const enough = cost <= 0 || gold >= cost;
this._showRefreshBg1(enough);
this._syncRefreshBounce(enough);
}
@ -1098,8 +1098,24 @@ export class UIBattleGame extends Auto_BattleGame {
if (node?.isValid && node.active !== active) node.active = active;
}
/** btnRefresh 只显示 bg1,隐藏进度底 bg2 和可刷新底 bg3 */
private _showRefreshBg1(): void {
/**
* 当前金币是否够付一次召唤。
*/
private _isRefreshGoldEnough(): boolean {
const battle = this._battle;
if (!battle) return false;
const gold = battle.localGold;
const cost = battle.bagSession
? battle.bagSession.normalRefreshCost
: getDiscountedBagNormalRefreshCost(0, resolveCarriedSummonCostReduceWan().reduceWan);
return cost <= 0 || gold >= cost;
}
/**
* btnRefresh 只显示 bg1,隐藏进度底 bg2 和可刷新底 bg3。金币不够时 bg1 置灰。
* @param enough 金币是否够付一次召唤
*/
private _showRefreshBg1(enough: boolean): void {
const btn = this.btnRefresh;
if (!btn?.isValid) return;
const bg1 = btn.getChildByName('bg1');
@ -1107,8 +1123,15 @@ export class UIBattleGame extends Auto_BattleGame {
const bg3 = btn.getChildByName('bg3');
if (!bg1?.isValid) {
console.log('[UIBattleGame] btnRefresh 缺少 bg1');
} else {
this._setNodeActive(bg1, true);
const sp = bg1.getComponent(Sprite);
if (!sp) {
console.log('[UIBattleGame] btnRefresh bg1 缺少 Sprite');
} else if (sp.grayscale === enough) {
sp.grayscale = !enough;
}
}
this._setNodeActive(bg1, true);
if (bg2?.isValid) Tween.stopAllByTarget(bg2);
this._setNodeActive(bg2, false);
this._setNodeActive(bg3, false);

Loading…
Cancel
Save