Commit 731a0f9b authored by wildfirecode's avatar wildfirecode

1

parent 8b1a0822
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
"bindingDataTestObj": [ "bindingDataTestObj": [
{ {
"key": "data.img", "key": "data.img",
"value": "http://yun.duiba.com.cn/babi/img/bm2ryg8wht.gif" "value": "http://yun.duiba.com.cn/db_games/0927/33256.png"
} }
] ]
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="closeBtn" label="" x="614" y="187"> <e:Button id="closeBtn" label="" x="609.64" y="212.2">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing"> <e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/> <e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
<e:Skin class="SignPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="SignPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16d5c2563cb"/> <w:Config id="16d5c2563cb"/>
<e:Image source="singprizebg_png" y="20" horizontalCenter="0"/> <e:Image source="singprizebg_png" y="20" horizontalCenter="0"/>
<e:Image id="img" y="297" touchEnabled="true" source="{data.img}" width="512" height="240" scaleX="1" scaleY="1" horizontalCenter="0" visible="false"/> <e:Image id="img" y="297" touchEnabled="true" source="{data.img}" width="512" height="240" scaleX="1" scaleY="1" horizontalCenter="0"/>
<e:Image id="money" source="signprize元宝_png" y="234.88" horizontalCenter="0" visible="false"/> <e:Image id="money" source="signprize元宝_png" y="234.88" horizontalCenter="0" visible="false"/>
<e:Image id="blood" source="singprize体力_png" y="233.8" horizontalCenter="0"/> <e:Image id="blood" source="singprize体力_png" y="233.8" horizontalCenter="0" visible="false"/>
<e:Group id="numsgroup" x="400.38" y="282.24"> <e:Group id="numsgroup" x="396.38" y="320.24">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/> <e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="nums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/> <e:Label id="nums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group> </e:Group>
<e:Button id="closeBtn" label="" x="613.12" y="160.96" locked="true"> <e:Button id="closeBtn" label="" x="607.12" y="180.96">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/> <e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="close2Btn" label="" y="564" horizontalCenter="0" locked="true"> <e:Button id="close2Btn" label="" y="564" horizontalCenter="0">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="signprize_btn_png" source.down="signprize_btn_png" source.disabled="signprize_btn_png"/> <e:Image width="100%" height="100%" source="signprize_btn_png" source.down="signprize_btn_png" source.disabled="signprize_btn_png"/>
......
...@@ -47,8 +47,11 @@ export class GuideCon extends egret.DisplayObjectContainer { ...@@ -47,8 +47,11 @@ export class GuideCon extends egret.DisplayObjectContainer {
timeoutId: number; timeoutId: number;
tri: egret.Bitmap; tri: egret.Bitmap;
showWord: ShowWord; showWord: ShowWord;
constructor() { callback;
constructor(callback) {
super(); super();
this.callback=callback;
var bg: egret.Shape = new egret.Shape(); var bg: egret.Shape = new egret.Shape();
bg.graphics.beginFill(0x000000, 0.7); bg.graphics.beginFill(0x000000, 0.7);
bg.graphics.drawRect(0, 0, 750, 1624); bg.graphics.drawRect(0, 0, 750, 1624);
...@@ -124,6 +127,7 @@ export class GuideCon extends egret.DisplayObjectContainer { ...@@ -124,6 +127,7 @@ export class GuideCon extends egret.DisplayObjectContainer {
if (this.parent) this.parent.removeChild(this); if (this.parent) this.parent.removeChild(this);
clearTimeout(this.timeoutId); clearTimeout(this.timeoutId);
writeCache(); writeCache();
if(this.callback)this.callback();
}, this) }, this)
this.addChild(guideOver); this.addChild(guideOver);
...@@ -206,6 +210,7 @@ export class GuideCon extends egret.DisplayObjectContainer { ...@@ -206,6 +210,7 @@ export class GuideCon extends egret.DisplayObjectContainer {
if (this.curStep > this.steps) { if (this.curStep > this.steps) {
if (this.parent) this.parent.removeChild(this); if (this.parent) this.parent.removeChild(this);
writeCache(); writeCache();
if(this.callback)this.callback();
} else { } else {
this.play(this.curStep); this.play(this.curStep);
//隐藏三角形 //隐藏三角形
......
...@@ -33,28 +33,39 @@ export default class MapScene extends Scene { ...@@ -33,28 +33,39 @@ export default class MapScene extends Scene {
super.start(); super.start();
if (getBgOn() && MapScene['firstPlayBgTag'] == true) {
playBg();
}
stopGamebg();
NetManager.ins.getSignInfo(() => { NetManager.ins.getSignInfo(() => {
if (!readCache() && getHomeData().levels.length <= 0) { //引导
const guide = new GuideCon(()=>{
const { signInfoVO } = DataManager.ins.getData('getSignInfo'); const { signInfoVO } = DataManager.ins.getData('getSignInfo');
if(signInfoVO.continueDay >=7) return; if (signInfoVO.continueDay >= 7) return;
if(signInfoVO.todaySigned == 0){ if (signInfoVO.todaySigned == 0) {
PanelCtrl.instance.show('sign'); PanelCtrl.instance.show('sign');
} }
}, window['signActivityId']); });
if (getBgOn() && MapScene['firstPlayBgTag'] == true) {
playBg();
}
stopGamebg();
if (!readCache() && getHomeData().levels.length <= 0) {
var guide = new GuideCon();
this.addChild(guide); this.addChild(guide);
guide.play(1) guide.play(1)
console.log(guide) console.log(guide)
} else { //不用引导
const { signInfoVO } = DataManager.ins.getData('getSignInfo');
if (signInfoVO.continueDay >= 7) return;
if (signInfoVO.todaySigned == 0) {
PanelCtrl.instance.show('sign');
}
} }
}, window['signActivityId']);
this.initSound(); this.initSound();
this._data = data; this._data = data;
...@@ -94,8 +105,12 @@ export default class MapScene extends Scene { ...@@ -94,8 +105,12 @@ export default class MapScene extends Scene {
const levelOrder = parseInt(key); const levelOrder = parseInt(key);
const element = MapScene.iconHash[key]; const element = MapScene.iconHash[key];
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if (levelOrder > (homeData.levels.length + 1) && levelOrder > 1) { if (
(levelOrder > (homeData.levels.length + 1) && levelOrder > 1 )
|| (levelOrder > window['last_level'])
) {
// showToast('必须通关前面的关卡才能开启本关'); // showToast('必须通关前面的关卡才能开启本关');
console.log('必须通关前面的关卡才能开启本关');
} else } else
PanelCtrl.instance.show('StartPanel', key); PanelCtrl.instance.show('StartPanel', key);
NetManager.ins.clickLog(getlogItem(19)) NetManager.ins.clickLog(getlogItem(19))
...@@ -168,7 +183,7 @@ export default class MapScene extends Scene { ...@@ -168,7 +183,7 @@ export default class MapScene extends Scene {
return this.getScrollV1(lastOrder, stageHeight); return this.getScrollV1(lastOrder, stageHeight);
} }
if (lastOrder >= window['total_level'] -10) {//底部的60-70关 70-10 if (lastOrder >= window['total_level'] - 10) {//底部的60-70关 70-10
return this.getScrollV2(lastOrder, stageHeight); return this.getScrollV2(lastOrder, stageHeight);
} }
//中部的4个循环*13 8~59 //中部的4个循环*13 8~59
...@@ -256,7 +271,7 @@ export default class MapScene extends Scene { ...@@ -256,7 +271,7 @@ export default class MapScene extends Scene {
const star = MapScene.starHash[1]; const star = MapScene.starHash[1];
star.setStar(0); star.setStar(0);
this.enableIcon(1); this.enableIcon(1);
} else if (homeData.levels.length == window['total_level']) { } else if (homeData.levels.length == window['last_level']) {
} else { } else {
const star = MapScene.starHash[homeData.levels.length + 1]; const star = MapScene.starHash[homeData.levels.length + 1];
......
...@@ -45,7 +45,9 @@ export default class SignPanel extends Panel { ...@@ -45,7 +45,9 @@ export default class SignPanel extends Panel {
} catch (error) { } catch (error) {
console.warn(error) console.warn(error)
} }
item['btn1'].enabled=false;
NetManager.ins.doSign((s)=>{ NetManager.ins.doSign((s)=>{
item['btn1'].enabled=true;
this.hidePanel(); this.hidePanel();
if(s) { if(s) {
const {customInfo,success} =DataManager.ins.getData('dosign'); const {customInfo,success} =DataManager.ins.getData('dosign');
......
...@@ -7,22 +7,26 @@ export default class SignPrizePanel extends Panel { ...@@ -7,22 +7,26 @@ export default class SignPrizePanel extends Panel {
this['money'].visible=false; this['money'].visible=false;
this['blood'].visible=false; this['blood'].visible=false;
this['numsgroup'].visible=false; this['numsgroup'].visible=true;
//奖品类型,none无奖励, object实物,virtual虚拟商品,coupon券,道具prop,元宝coin,体力times, //奖品类型,none无奖励, object实物,virtual虚拟商品,coupon券,道具prop,元宝coin,体力times,
const {customInfo} =DataManager.ins.getData('dosign'); const {customInfo} =DataManager.ins.getData('dosign');
const prizeType= customInfo.prizeType ; const prizeType= customInfo.prizeType ;
if(customInfo.logo && prizeType!= 'times' && prizeType!= 'coin'&& prizeType!= 'prop') { if(customInfo.logo && prizeType!= 'times' && prizeType!= 'coin'&& prizeType!= 'prop') {
this['img'].source = customInfo.logo; this['img'].source = customInfo.logo;
this['numsgroup'].visible=false;
} else { } else {
if(customInfo.itemId) if(customInfo.itemId)
this['img'].source = `http://yun.duiba.com.cn/db_games/0927/${customInfo.itemId}.png`; this['img'].source = `http://yun.duiba.com.cn/db_games/0927/${customInfo.itemId}.png`;
} }
this['nums'].text ='x'+ customInfo.prizeCount; this['nums'].text ='x'+ customInfo.prizeCount;
if(prizeType=='prop') {
this['numsgroup'].x=396.38;
this['numsgroup'].y=320.38;
}
this['img'].visible = prizeType!= 'times' && prizeType!= 'coin'; this['img'].visible = prizeType!= 'times' && prizeType!= 'coin';
this['numsgroup'].visible = customInfo.prizeCount;
this['money'].visible = prizeType=='coin'; this['money'].visible = prizeType=='coin';
this['blood'].visible = prizeType=='times'; this['blood'].visible = prizeType=='times';
} }
......
...@@ -2,361 +2,11 @@ ...@@ -2,361 +2,11 @@
"success": true, "success": true,
"code": "0000000000", "code": "0000000000",
"desc": "OK", "desc": "OK",
"timestamp": 1566885811031, "timestamp": 1569721913840,
"data": { "data": {
"wealth": 7960, "wealth": 10835,
"totalStars": 145, "totalStars": 199,
"levels": [ "levels": [
{
"levelNum": 1,
"maxScore": 36320,
"stars": 3
},
{
"levelNum": 2,
"maxScore": 18680,
"stars": 3
},
{
"levelNum": 3,
"maxScore": 19530,
"stars": 3
},
{
"levelNum": 4,
"maxScore": 20230,
"stars": 3
},
{
"levelNum": 5,
"maxScore": 10710,
"stars": 3
},
{
"levelNum": 6,
"maxScore": 42580,
"stars": 3
},
{
"levelNum": 7,
"maxScore": 23700,
"stars": 3
},
{
"levelNum": 8,
"maxScore": 99999,
"stars": 3
},
{
"levelNum": 9,
"maxScore": 70330,
"stars": 3
},
{
"levelNum": 10,
"maxScore": 27710,
"stars": 3
},
{
"levelNum": 11,
"maxScore": 19410,
"stars": 3
},
{
"levelNum": 12,
"maxScore": 23650,
"stars": 3
},
{
"levelNum": 13,
"maxScore": 34150,
"stars": 1
},
{
"levelNum": 14,
"maxScore": 37110,
"stars": 1
},
{
"levelNum": 15,
"maxScore": 99999,
"stars": 2
},
{
"levelNum": 16,
"maxScore": 99999,
"stars": 3
},
{
"levelNum": 17,
"maxScore": 42420,
"stars": 3
},
{
"levelNum": 18,
"maxScore": 99999,
"stars": 2
},
{
"levelNum": 19,
"maxScore": 99999,
"stars": 3
},
{
"levelNum": 20,
"maxScore": 47520,
"stars": 3
},
{
"levelNum": 21,
"maxScore": 14080,
"stars": 3
},
{
"levelNum": 22,
"maxScore": 75790,
"stars": 1
},
{
"levelNum": 23,
"maxScore": 50340,
"stars": 3
},
{
"levelNum": 24,
"maxScore": 83590,
"stars": 3
},
{
"levelNum": 25,
"maxScore": 45570,
"stars": 3
},
{
"levelNum": 26,
"maxScore": 99999,
"stars": 3
},
{
"levelNum": 27,
"maxScore": 44540,
"stars": 2
},
{
"levelNum": 28,
"maxScore": 112230,
"stars": 3
},
{
"levelNum": 29,
"maxScore": 67810,
"stars": 3
},
{
"levelNum": 30,
"maxScore": 43530,
"stars": 2
},
{
"levelNum": 31,
"maxScore": 99999,
"stars": 3
},
{
"levelNum": 32,
"maxScore": 18450,
"stars": 1
},
{
"levelNum": 33,
"maxScore": 28560,
"stars": 1
},
{
"levelNum": 34,
"maxScore": 99999,
"stars": 1
},
{
"levelNum": 35,
"maxScore": 99999,
"stars": 3
},
{
"levelNum": 36,
"maxScore": 14860,
"stars": 0
},
{
"levelNum": 37,
"maxScore": 22300,
"stars": 0
},
{
"levelNum": 38,
"maxScore": 43380,
"stars": 3
},
{
"levelNum": 39,
"maxScore": 27610,
"stars": 0
},
{
"levelNum": 40,
"maxScore": 99999,
"stars": 3
},
{
"levelNum": 41,
"maxScore": 30890,
"stars": 2
},
{
"levelNum": 42,
"maxScore": 15660,
"stars": 3
},
{
"levelNum": 43,
"maxScore": 48170,
"stars": 1
},
{
"levelNum": 44,
"maxScore": 18080,
"stars": 1
},
{
"levelNum": 45,
"maxScore": 29170,
"stars": 1
},
{
"levelNum": 46,
"maxScore": 37980,
"stars": 1
},
{
"levelNum": 47,
"maxScore": 37800,
"stars": 3
},
{
"levelNum": 48,
"maxScore": 19950,
"stars": 1
},
{
"levelNum": 49,
"maxScore": 36190,
"stars": 0
},
{
"levelNum": 50,
"maxScore": 42610,
"stars": 2
},
{
"levelNum": 51,
"maxScore": 34300,
"stars": 1
},
{
"levelNum": 52,
"maxScore": 31650,
"stars": 3
},
{
"levelNum": 53,
"maxScore": 5140,
"stars": 0
},
{
"levelNum": 54,
"maxScore": 49630,
"stars": 3
},
{
"levelNum": 55,
"maxScore": 99999,
"stars": 1
},
{
"levelNum": 56,
"maxScore": 99999,
"stars": 3
},
{
"levelNum": 57,
"maxScore": 34090,
"stars": 2
},
{
"levelNum": 58,
"maxScore": 13030,
"stars": 3
},
{
"levelNum": 59,
"maxScore": 72760,
"stars": 1
},
{
"levelNum": 60,
"maxScore": 16250,
"stars": 1
},
{
"levelNum": 61,
"maxScore": 81870,
"stars": 3
},
{
"levelNum": 62,
"maxScore": 36110,
"stars": 1
},
{
"levelNum": 63,
"maxScore": 28240,
"stars": 3
},
{
"levelNum": 64,
"maxScore": 23910,
"stars": 1
},
{
"levelNum": 65,
"maxScore": 47990,
"stars": 1
},
{
"levelNum": 66,
"maxScore": 60740,
"stars": 3
},
{
"levelNum": 67,
"maxScore": 33670,
"stars": 1
},
{
"levelNum": 68,
"maxScore": 25370,
"stars": 3
},
{
"levelNum": 69,
"maxScore": 11650,
"stars": 0
},
{
"levelNum": 70,
"maxScore": 15910,
"stars": 1
}
], ],
"remainProp": [ "remainProp": [
{ {
...@@ -372,9 +22,11 @@ ...@@ -372,9 +22,11 @@
"num": 0 "num": 0
} }
], ],
"remainEnargy": 9979, "remainEnargy": 5,
"askForEnergy": false, "askForEnergy": false,
"canReceiveTreasureBoxNum": 0, "canReceiveTreasureBoxNum": 0,
"nextRangeStarsNum": 150 "nextRangeStarsNum": 210,
"isGetAllTreasureBox": false,
"refectionCountdown": 0
} }
} }
\ No newline at end of file
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
"success":true, "success":true,
"errorMsg":null, "errorMsg":null,
"code":"", "code":"",
"prizeType":"object", "prizeType":"",
"prizeName":"奖品名称", "prizeName":"奖品名称",
"logo":"http://yun.duiba.com.cn/db_games/activity/game/guideImage/guide2.png", "logo":"http://yun.duiba.com.cn/db_games/activity/game/guideImage/guide2.png",
"prizeCount":10, "prizeCount":10,
"itemId":59521 "itemId":33256
} }
} }
\ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
"success": true, "success": true,
"signInfoVO": { "signInfoVO": {
"continueDay": 6, "continueDay": 6,
"todaySigned": 1 "todaySigned": 0
} }
} }
\ No newline at end of file
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