|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-21 11:57:43
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-04-28 16:38:08
|
|
|
+ * @LastEditTime: 2025-04-29 17:09:44
|
|
|
* @Description: 惊喜翻倍弹窗
|
|
|
*/
|
|
|
import { _decorator, instantiate, Label, Node, Prefab, UITransform } from 'cc';
|
|
|
@@ -98,7 +98,6 @@ export class DoubleRewardsView extends VMParent {
|
|
|
oops.gui.remove(UIID.DoubleRewards);
|
|
|
oops.message.dispatchEvent(GameEvent.updateGameState, "playing");
|
|
|
smc.game.GameModel.allAdCount++;
|
|
|
- smc.game.GameModel.smallAdCount = 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -161,7 +160,7 @@ export class DoubleRewardsView extends VMParent {
|
|
|
if (this.data.curGoldNum / this.data.handlingCharge > 0.5) {
|
|
|
this.tipsLabelNode.setPosition(60, this.tipsLabelNode.position.y);
|
|
|
} else if (this.data.curGoldNum / this.data.handlingCharge < 0.5) {
|
|
|
- this.tipsLabelNode.setPosition(-60, this.tipsLabelNode.position.y);
|
|
|
+ this.tipsLabelNode.setPosition(-80, this.tipsLabelNode.position.y);
|
|
|
} else {
|
|
|
this.tipsLabelNode.setPosition(0, this.tipsLabelNode.position.y);
|
|
|
}
|
|
|
@@ -254,9 +253,9 @@ export class DoubleRewardsView extends VMParent {
|
|
|
const firstLevel = levelInfoList[0].level;
|
|
|
const lastLevel = levelInfoList[levelInfoList.length - 1].level;
|
|
|
const levelRange = lastLevel - firstLevel || 1;
|
|
|
-
|
|
|
let foundFirstNotWithdraw = false;
|
|
|
-
|
|
|
+ //现在要算平均长度,总长度除数组长度
|
|
|
+ let singleLength = totalLength / levelInfoList.length;
|
|
|
const secondLastIndex = levelInfoList.length - 2;
|
|
|
const allBeforeSecondLastWithdrawed = levelInfoList
|
|
|
.slice(0, secondLastIndex)
|
|
|
@@ -269,7 +268,9 @@ export class DoubleRewardsView extends VMParent {
|
|
|
} else if (index === levelInfoList.length - 1) {
|
|
|
item.position = this.progressNode.position.x + totalLength;
|
|
|
} else {
|
|
|
- item.position = this.progressNode.position.x + (((item.level - firstLevel) / levelRange) * totalLength);
|
|
|
+ //因为产品和UI说只要算平均长度就好
|
|
|
+ // item.position = this.progressNode.position.x + (((item.level - firstLevel) / levelRange) * totalLength);
|
|
|
+ item.position = this.progressNode.position.x + index * singleLength;
|
|
|
}
|
|
|
|
|
|
// 标记第一个未提现
|