Commit 7d8ab54b authored by wjf's avatar wjf

l

parent 1b269d69
This diff is collapsed.
This diff is collapsed.
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
"name": "lotteryScene" "name": "lotteryScene"
}, },
{ {
"keys": "cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.png,map_avatar_bg.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_creditsBg.png,map_energyAdd.png,map_energyBg.png,map_prizeBox.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png,map_taskBtn.png,map_推车.png,map_狐狸气球.png,water1.png,water2.png", "keys": "appointCountBg.png,cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.png,loopMsgBg.png,map_avatar_bg.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_creditsBg.png,map_energyAdd.png,map_energyBg.png,map_prizeBox.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png,map_taskBtn.png,map_推车.png,map_狐狸气球.png,remindIcon.png,water1.png,water2.png",
"name": "map" "name": "map"
}, },
{ {
......
...@@ -4319,19 +4319,30 @@ export const ResJson = { ...@@ -4319,19 +4319,30 @@ export const ResJson = {
} }
}, },
{ {
"keys": "cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.png,map_avatar_bg.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_creditsBg.png,map_energyAdd.png,map_energyBg.png,map_prizeBox.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png,map_taskBtn.png,map_推车.png,map_狐狸气球.png,water1.png,water2.png", "keys": "appointCountBg.png,cur_light_1.png,cur_light_2.png,guide_fox.png,guide_hand.png,guide_light.png,guide_tip.png,loopMsgBg.png,map_avatar_bg.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_creditsBg.png,map_energyAdd.png,map_energyBg.png,map_prizeBox.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png,map_taskBtn.png,map_推车.png,map_狐狸气球.png,remindIcon.png,water1.png,water2.png",
"name": "map", "name": "map",
"atlas": { "atlas": {
"appointCountBg.png": {
"x": 258,
"y": 471,
"w": 259,
"h": 45,
"ox": 0,
"oy": 0,
"sw": 259,
"sh": 45,
"ro": true
},
"cur_light_1.png": { "cur_light_1.png": {
"x": 220, "x": 258,
"y": 206, "y": 732,
"w": 187, "w": 187,
"h": 115, "h": 115,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 197, "sw": 197,
"sh": 123, "sh": 123,
"ro": true "ro": false
}, },
"cur_light_2.png": { "cur_light_2.png": {
"x": 132, "x": 132,
...@@ -4345,8 +4356,8 @@ export const ResJson = { ...@@ -4345,8 +4356,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"guide_fox.png": { "guide_fox.png": {
"x": 275, "x": 305,
"y": 793, "y": 471,
"w": 202, "w": 202,
"h": 219, "h": 219,
"ox": 0, "ox": 0,
...@@ -4356,8 +4367,8 @@ export const ResJson = { ...@@ -4356,8 +4367,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"guide_hand.png": { "guide_hand.png": {
"x": 573, "x": 509,
"y": 113, "y": 406,
"w": 90, "w": 90,
"h": 91, "h": 91,
"ox": 0, "ox": 0,
...@@ -4367,8 +4378,8 @@ export const ResJson = { ...@@ -4367,8 +4378,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"guide_light.png": { "guide_light.png": {
"x": 380, "x": 424,
"y": 156, "y": 428,
"w": 40, "w": 40,
"h": 40, "h": 40,
"ox": 0, "ox": 0,
...@@ -4388,9 +4399,20 @@ export const ResJson = { ...@@ -4388,9 +4399,20 @@ export const ResJson = {
"sh": 166, "sh": 166,
"ro": true "ro": true
}, },
"loopMsgBg.png": {
"x": 170,
"y": 484,
"w": 369,
"h": 86,
"ox": 0,
"oy": 0,
"sw": 369,
"sh": 86,
"ro": true
},
"map_avatar_bg.png": { "map_avatar_bg.png": {
"x": 481, "x": 483,
"y": 289, "y": 300,
"w": 95, "w": 95,
"h": 104, "h": 104,
"ox": 0, "ox": 0,
...@@ -4400,8 +4422,8 @@ export const ResJson = { ...@@ -4400,8 +4422,8 @@ export const ResJson = {
"ro": false "ro": false
}, },
"map_check_disable.png": { "map_check_disable.png": {
"x": 481, "x": 469,
"y": 178, "y": 189,
"w": 109, "w": 109,
"h": 90, "h": 90,
"ox": 0, "ox": 0,
...@@ -4411,8 +4433,8 @@ export const ResJson = { ...@@ -4411,8 +4433,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"map_check_disable_prize.png": { "map_check_disable_prize.png": {
"x": 511, "x": 488,
"y": 2, "y": 846,
"w": 109, "w": 109,
"h": 104, "h": 104,
"ox": 0, "ox": 0,
...@@ -4422,52 +4444,52 @@ export const ResJson = { ...@@ -4422,52 +4444,52 @@ export const ResJson = {
"ro": true "ro": true
}, },
"map_check_enable.png": { "map_check_enable.png": {
"x": 220, "x": 614,
"y": 395, "y": 2,
"w": 103, "w": 103,
"h": 82, "h": 82,
"ox": 1, "ox": 1,
"oy": 16, "oy": 16,
"sw": 109, "sw": 109,
"sh": 104, "sh": 104,
"ro": false "ro": true
}, },
"map_check_enable_cur.png": { "map_check_enable_cur.png": {
"x": 170, "x": 561,
"y": 793, "y": 189,
"w": 103, "w": 103,
"h": 82, "h": 82,
"ox": 2, "ox": 2,
"oy": 15, "oy": 15,
"sw": 109, "sw": 109,
"sh": 104, "sh": 104,
"ro": false "ro": true
}, },
"map_creditsBg.png": { "map_creditsBg.png": {
"x": 325, "x": 469,
"y": 395, "y": 2,
"w": 185, "w": 185,
"h": 71, "h": 71,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 185, "sw": 185,
"sh": 71, "sh": 71,
"ro": false "ro": true
}, },
"map_energyAdd.png": { "map_energyAdd.png": {
"x": 235, "x": 305,
"y": 877, "y": 692,
"w": 35, "w": 35,
"h": 33, "h": 33,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 35, "sw": 35,
"sh": 33, "sh": 33,
"ro": false "ro": true
}, },
"map_energyBg.png": { "map_energyBg.png": {
"x": 337, "x": 542,
"y": 206, "y": 2,
"w": 185, "w": 185,
"h": 70, "h": 70,
"ox": 0, "ox": 0,
...@@ -4478,18 +4500,18 @@ export const ResJson = { ...@@ -4478,18 +4500,18 @@ export const ResJson = {
}, },
"map_prizeBox.png": { "map_prizeBox.png": {
"x": 220, "x": 220,
"y": 2, "y": 311,
"w": 158, "w": 158,
"h": 202, "h": 202,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 158, "sw": 158,
"sh": 202, "sh": 202,
"ro": false "ro": true
}, },
"map_prizeBtn.png": { "map_prizeBtn.png": {
"x": 409, "x": 447,
"y": 198, "y": 692,
"w": 152, "w": 152,
"h": 70, "h": 70,
"ox": 0, "ox": 0,
...@@ -4499,8 +4521,8 @@ export const ResJson = { ...@@ -4499,8 +4521,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"map_ruleBtn.png": { "map_ruleBtn.png": {
"x": 380, "x": 416,
"y": 2, "y": 849,
"w": 152, "w": 152,
"h": 70, "h": 70,
"ox": 0, "ox": 0,
...@@ -4510,26 +4532,26 @@ export const ResJson = { ...@@ -4510,26 +4532,26 @@ export const ResJson = {
"ro": true "ro": true
}, },
"map_star_disable.png": { "map_star_disable.png": {
"x": 235, "x": 367,
"y": 939, "y": 692,
"w": 25, "w": 25,
"h": 24, "h": 24,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 25, "sw": 25,
"sh": 24, "sh": 24,
"ro": false "ro": true
}, },
"map_star_enable.png": { "map_star_enable.png": {
"x": 235, "x": 340,
"y": 912, "y": 692,
"w": 26, "w": 26,
"h": 25, "h": 25,
"ox": 0, "ox": 0,
"oy": 0, "oy": 0,
"sw": 26, "sw": 26,
"sh": 25, "sh": 25,
"ro": false "ro": true
}, },
"map_taskBtn.png": { "map_taskBtn.png": {
"x": 2, "x": 2,
...@@ -4543,8 +4565,8 @@ export const ResJson = { ...@@ -4543,8 +4565,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"map_推车.png": { "map_推车.png": {
"x": 170, "x": 220,
"y": 484, "y": 2,
"w": 247, "w": 247,
"h": 307, "h": 307,
"ox": 0, "ox": 0,
...@@ -4564,9 +4586,20 @@ export const ResJson = { ...@@ -4564,9 +4586,20 @@ export const ResJson = {
"sh": 480, "sh": 480,
"ro": false "ro": false
}, },
"remindIcon.png": {
"x": 235,
"y": 855,
"w": 179,
"h": 166,
"ox": 0,
"oy": 0,
"sw": 179,
"sh": 166,
"ro": false
},
"water1.png": { "water1.png": {
"x": 452, "x": 488,
"y": 119, "y": 957,
"w": 57, "w": 57,
"h": 101, "h": 101,
"ox": 0, "ox": 0,
...@@ -4576,8 +4609,8 @@ export const ResJson = { ...@@ -4576,8 +4609,8 @@ export const ResJson = {
"ro": true "ro": true
}, },
"water2.png": { "water2.png": {
"x": 452, "x": 424,
"y": 2, "y": 311,
"w": 57, "w": 57,
"h": 115, "h": 115,
"ox": 0, "ox": 0,
...@@ -8409,5 +8442,5 @@ export const ResJson = { ...@@ -8409,5 +8442,5 @@ export const ResJson = {
} }
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1597303204/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1597903646/resource/"
} }
\ No newline at end of file
...@@ -84,6 +84,11 @@ export enum TbNetName { ...@@ -84,6 +84,11 @@ export enum TbNetName {
///////////////////前端调用接口都加个mine ///////////////////前端调用接口都加个mine
/**
* 获取120名通关的人数
*/
getAppointCount = "mine.getAppointCount",
////带用户操作,和index.js特殊操作的 ////带用户操作,和index.js特殊操作的
/** /**
* 用户授权 * 用户授权
......
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import { GDispatcher } from "../Main";
export class FreePowerPanel extends Panel { export class FreePowerPanel extends Panel {
get groupNames() { return ["FreePowerPanel"] } get groupNames() { return ["FreePowerPanel"] }
get skinName() { return "FreePowerPanel" } get skinName() { return "FreePowerPanel" }
acceptBtn:FYGE.Button; acceptBtn: FYGE.Button;
closeBtn:FYGE.Button; closeBtn: FYGE.Button;
get closeBtns(){ get closeBtns() {
return [this.closeBtn,this.acceptBtn] return [this.closeBtn, this.acceptBtn]
} }
hidePanel() {
super.hidePanel();
//显示倒计时
GDispatcher.dispatchEvent("showRemindIcon")
}
} }
This diff is collapsed.
...@@ -16,6 +16,8 @@ import { LotteryScene } from "../LotteryScene"; ...@@ -16,6 +16,8 @@ import { LotteryScene } from "../LotteryScene";
import { GDispatcher } from "../../Main"; import { GDispatcher } from "../../Main";
import { G_EVENT } from "../../common/G_EVENT"; import { G_EVENT } from "../../common/G_EVENT";
import Tween = FYGE.Tween; import Tween = FYGE.Tween;
import { layers } from "../../../module/views/layers";
import { LoopMsg } from "./LoopMsg";
export default class MapUI extends Container { export default class MapUI extends Container {
public energyBox: EnergyBox = null; public energyBox: EnergyBox = null;
...@@ -58,7 +60,7 @@ export default class MapUI extends Container { ...@@ -58,7 +60,7 @@ export default class MapUI extends Container {
console.log('我的奖品'); console.log('我的奖品');
sendTbNet( sendTbNet(
TbNetName.navigateTo, TbNetName.navigateTo,
{url: '/pages/myPrize/myPrize'}, { url: '/pages/myPrize/myPrize' },
() => { () => {
}, },
true true
...@@ -100,6 +102,37 @@ export default class MapUI extends Container { ...@@ -100,6 +102,37 @@ export default class MapUI extends Container {
this.energyBox = this.addChild(new EnergyBox({})); this.energyBox = this.addChild(new EnergyBox({}));
this.creditsBox = this.addChild(new CreditsBox({})); this.creditsBox = this.addChild(new CreditsBox({}));
this.prizeBox = this.addChild(new PrizeBox({})); this.prizeBox = this.addChild(new PrizeBox({}));
//显示120关通关人数
sendTbNet(TbNetName.getAppointCount).then((res) => {
if (!res.success) return;
this.addChild(new class extends Sprite {
constructor() {
super(RES.getRes("appointCountBg.png"));
this.addChild(Tools.getText(
`${res.data}人已解锁120关`,
26,
"#ffffff",
TEXT_ALIGN.CENTER, 259,
0, 10
))
}
})
.position.set(this.prizeBox.x - 51, this.prizeBox.y + 202 + 40)
})
//轮播的中奖
this.addChild(new LoopMsg()).position.set(0, layers.stageHeight - 100 - 86)
//是否显示下一次领取免费体力的icon;
var remindIcon = this.addChild(new RemindIcon());
remindIcon.position.set(560, layers.stageHeight - 166 - 82);
if (!Tools.gameData.loginAddPower) {
remindIcon.visible = true;
} else {
remindIcon.visible = false;
//不需要考虑移除,因为这种情况,免费体力弹框必出,关闭后必触发
GDispatcher.once("showRemindIcon", () => { remindIcon.visible = true; }, this)
}
} }
public updateUI() { public updateUI() {
...@@ -108,6 +141,49 @@ export default class MapUI extends Container { ...@@ -108,6 +141,49 @@ export default class MapUI extends Container {
} }
} }
/**
* 提示下次领奖的时间倒计时
*/
class RemindIcon extends Sprite {
constructor() {
super(RES.getRes("remindIcon.png"));
//文案
var txt = this.addChild(Tools.getText(
"",
24,
"#ffffff",
TEXT_ALIGN.CENTER,
130,
(179 - 130) / 2, 122
))
var zeroTime = new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1;
this.addEventListener(FYGE.Event.ENTER_FRAME, () => {
var now = Date.now();
if (now > zeroTime) {
this.visible = false;
return
}
//转时分秒
txt.text = this.getShiFenMiaoByTimeStamp(zeroTime - now);
}, this)
}
/**
* 转换成 1:2:33
* @param timeStamp
*/
getShiFenMiaoByTimeStamp(timeStamp: number): string {
var hours: any = Math.floor((timeStamp % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes: any = Math.floor((timeStamp % (1000 * 60 * 60)) / (1000 * 60));
var seconds: any = Math.floor((timeStamp % (1000 * 60)) / 1000);
hours = hours < 10 ? ('0' + hours) : hours;
minutes = minutes < 10 ? ('0' + minutes) : minutes;
seconds = seconds < 10 /*&& seconds >= 1*/ ? ('0' + seconds) : seconds;
return hours + ":" + minutes + ":" + seconds;
}
}
/** /**
* 能量 * 能量
*/ */
...@@ -243,7 +319,7 @@ class PrizeBox extends Button { ...@@ -243,7 +319,7 @@ class PrizeBox extends Button {
this["frames"] = null this["frames"] = null
// s.scale.x = s.scale.y = 0.9 // s.scale.x = s.scale.y = 0.9
Tween.removeTweens(this); Tween.removeTweens(this);
Tween.get(this).to({scaleX: 1, scaleY: 1}, 50); Tween.get(this).to({ scaleX: 1, scaleY: 1 }, 50);
} }
} else { } else {
// @ts-ignore // @ts-ignore
...@@ -254,7 +330,7 @@ class PrizeBox extends Button { ...@@ -254,7 +330,7 @@ class PrizeBox extends Button {
this["frames"] = this["framesOri"] this["frames"] = this["framesOri"]
// s.scale.x = s.scale.y = 1 // s.scale.x = s.scale.y = 1
Tween.removeTweens(this); Tween.removeTweens(this);
Tween.get(this).to({scaleX: 1.2, scaleY: 1.2}, 50); Tween.get(this).to({ scaleX: 1.2, scaleY: 1.2 }, 50);
} }
} }
} }
...@@ -344,7 +420,7 @@ class PrizeBox extends Button { ...@@ -344,7 +420,7 @@ class PrizeBox extends Button {
this.prizeImg.texture = Texture.fromUrl(Tools.baseInfo.levelPrize[`level_${lowerLevel}`]); this.prizeImg.texture = Texture.fromUrl(Tools.baseInfo.levelPrize[`level_${lowerLevel}`]);
this.addEventListener(FYGE.MouseEvent.CLICK, () => { this.addEventListener(FYGE.MouseEvent.CLICK, () => {
Tools.btnDelay(this); Tools.btnDelay(this);
changeScene(LotteryScene, {level: lowerLevel}) changeScene(LotteryScene, { level: lowerLevel })
}, this) }, this)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment