Commit 703ce1b9 authored by 邱旭's avatar 邱旭

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

parents 2b79fcb7 f1492d59
......@@ -198,7 +198,7 @@ export default class MainBase extends eui.UILayer {
else {
RES.getResAsync('main_mapbottom_png');
RES.getResAsync('lightani_png');
for (var i = 1; i < 19; i++) {
RES.getResAsync("boom" + i + "_png")
}
......@@ -237,7 +237,7 @@ export default class MainBase extends eui.UILayer {
for (var i = 1; i <= 11; i++) {
RES.getResAsync("stepAni" + i + "_png")
}
var aaa = [1, 3, 5, 7, 9, 11, 14, 16, 18, 19, 21, 23, 25, 27, 29, 32, 34];
for (var i = 1; i <= 60; i++) {
if (aaa.indexOf(i) >= 0) {
......@@ -291,6 +291,8 @@ export default class MainBase extends eui.UILayer {
"ele7",
"ele8",
"ele9",
"ele10",
"ele11",
"leftArrow",
"chooseRect",
"lightedStar",
......@@ -315,7 +317,7 @@ export default class MainBase extends eui.UILayer {
this.ajaxElement().then(() => {
SceneCtrl.instance.change(ModuleTypes.INVITE_SCENE);
})
}else if (window['isInvitePage'] == 2) {
} else if (window['isInvitePage'] == 2) {
this.ajaxElement().then(() => {
SceneCtrl.instance.change(ModuleTypes.INVITE_SCENE2);
})
......
......@@ -928,7 +928,7 @@ export class NetManager extends ABNetManager {
this.send(net);
})
}
public hc_turnableBaseInfo(callback: Function, propType?: number): void {
public hc_turnableBaseInfo(callback: Function): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId
};
......@@ -943,7 +943,7 @@ export class NetManager extends ABNetManager {
};
this.send(net);
}
public hc_turnableDojoin(callback: Function, propType?: number): void {
public hc_turnableDojoin(callback: Function): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId,
detect: window['detect'],
......
......@@ -61,7 +61,7 @@
"name": "prize2"
},
{
"keys": "startpanel通关条件_png,startpanel数量_png,startpanel数量 副本 3_png,startpanel目标33_png,startpanel目标3_png,startpanel按钮_png,startpanel_icon3_png,startpanel_icon2_png,startpanel_icon1_png,startpanel_icon_png,startpanel_ele9_png,startpanel_ele8_png,startpanel_ele7_png,startpanel_ele6_png,startpanel_ele5_png,startpanel_ele4_png,startpanel_ele3_png,startpanel_ele2_png,startpanel_ele1_png,startpanel_ele0_png,startpanel_block2_png,startpanel_bg2_png,startpanel_avatar_png",
"keys": "startpanel通关条件_png,startpanel数量_png,startpanel数量 副本 3_png,startpanel目标33_png,startpanel目标3_png,startpanel按钮_png,startpanel_icon3_png,startpanel_icon2_png,startpanel_icon1_png,startpanel_icon_png,startpanel_ele9_png,startpanel_ele8_png,startpanel_ele7_png,startpanel_ele6_png,startpanel_ele5_png,startpanel_ele4_png,startpanel_ele3_png,startpanel_ele2_png,startpanel_ele1_png,startpanel_ele0_png,startpanel_block2_png,startpanel_bg2_png,startpanel_avatar_png,startpanel_ele10_png",
"name": "startpanel"
},
{
......@@ -97,7 +97,7 @@
"name": "h5"
},
{
"keys": "bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,eggPiece1_png,eggPiece2_png,eggPiece3_png,eggPiece4_png,eggPiece5_png,eggStatus0_png,eggStatus1_png,eggStatus2_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,ele9_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,greenCircleDown_png,greenCircleUp_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_png,hammerBtn_png,ice2_png,ice3_png,ice4_png,ice5_png,ice6_png,jellyArrow_png,leftArrow_png,lightedStar_png,lineLight_png,lockVine_png,magicLion_png,magicLionBg_png,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_png,starProgress_png,stepAni1_png,stepAni10_png,stepAni11_png,stepAni2_png,stepAni3_png,stepAni4_png,stepAni5_png,stepAni6_png,stepAni7_png,stepAni8_png,stepAni9_png,stepBtn_png,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yellowCircleDown_png,yellowCircleUp_png,yezi1_png,bubbleStar19_png,bubleEle0_png,bubleEle1_png,bubleEle2_png,bubleEle3_png,bubleEle4_png,bubbleStar1_png,bubbleStar2_png,bubbleStar3_png,bubbleStar4_png,bubbleStar5_png,bubbleStar6_png,bubbleStar7_png,bubbleStar8_png,bubbleStar9_png,bubbleStar10_png,bubbleStar11_png,bubbleStar12_png,bubbleStar13_png,bubbleStar14_png,bubbleStar15_png,bubbleStar16_png,bubbleStar17_png,bubbleStar18_png",
"keys": "bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,eggPiece1_png,eggPiece2_png,eggPiece3_png,eggPiece4_png,eggPiece5_png,eggStatus0_png,eggStatus1_png,eggStatus2_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,ele9_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,greenCircleDown_png,greenCircleUp_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_png,hammerBtn_png,ice2_png,ice3_png,ice4_png,ice5_png,ice6_png,jellyArrow_png,leftArrow_png,lightedStar_png,lineLight_png,lockVine_png,magicLion_png,magicLionBg_png,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_png,starProgress_png,stepAni1_png,stepAni10_png,stepAni11_png,stepAni2_png,stepAni3_png,stepAni4_png,stepAni5_png,stepAni6_png,stepAni7_png,stepAni8_png,stepAni9_png,stepBtn_png,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yellowCircleDown_png,yellowCircleUp_png,yezi1_png,bubbleStar19_png,bubleEle0_png,bubleEle1_png,bubleEle2_png,bubleEle3_png,bubleEle4_png,bubbleStar1_png,bubbleStar2_png,bubbleStar3_png,bubbleStar4_png,bubbleStar5_png,bubbleStar6_png,bubbleStar7_png,bubbleStar8_png,bubbleStar9_png,bubbleStar10_png,bubbleStar11_png,bubbleStar12_png,bubbleStar13_png,bubbleStar14_png,bubbleStar15_png,bubbleStar16_png,bubbleStar17_png,bubbleStar18_png,ele11_png,ele10_png",
"name": "main2"
},
{
......@@ -157,7 +157,7 @@
"name": "back"
},
{
"keys": "turprize继续闯关按钮_png,turprizebg_png",
"keys": "turprize继续闯关按钮_png,turprizebg_png,turnprize_icon1_png,turnprize_icon2_png,turnprize_icon3_png",
"name": "turntableprize"
},
{
......@@ -2747,6 +2747,26 @@
"url": "assets/turntable/turnable_icon3.png",
"type": "image",
"name": "turnable_icon3_png"
},
{
"url": "assets/mainScene/ele11.png",
"type": "image",
"name": "ele11_png"
},
{
"url": "assets/mainScene/ele10.png",
"type": "image",
"name": "ele10_png"
},
{
"url": "assets/mainScene/ele11.png",
"type": "image",
"name": "ele11_png"
},
{
"url": "assets/mainScene/ele10.png",
"type": "image",
"name": "ele10_png"
}
]
}
\ No newline at end of file
......@@ -12,5 +12,6 @@
<e:Image id="icon7" width="60" height="60" source="startpanel_ele7_png"/>
<e:Image id="icon8" width="60" height="60" source="startpanel_ele8_png"/>
<e:Image id="icon9" width="60" height="60" source="startpanel_ele9_png"/>
<e:Image id="icon10" width="60" height="60" source="startpanel_ele10_png"/>
<e:BitmapLabel id="txt" text="X0" font="nums2_fnt" scaleX="0.4" scaleY="0.4" y="46" horizontalCenter="0"/>
</e:Skin>
\ No newline at end of file
......@@ -28,10 +28,10 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="status2" text="(免费次数:1)" x="69.3" y="62.66" size="22" touchEnabled="false"/>
<e:Label id="status2" text="(免费次数:1)" x="69.3" y="62.66" size="22" touchEnabled="false" visible="false"/>
<e:Group id="status1" x="52" y="60" touchChildren="false" touchEnabled="false">
<e:Label text=")" x="132" y="2" size="22" touchEnabled="false"/>
<e:Label id="nums" text="(-50" x="0" y="0" size="22" textAlign="right" width="82" touchEnabled="false"/>
<e:Label id="nums" text="(-50" x="0" y="3" size="22" textAlign="right" width="82" touchEnabled="false"/>
<e:Image source="common_yuanbao_png" x="91.99" y="1.67"/>
</e:Group>
</e:Group>
......
......@@ -5,8 +5,15 @@
<e:Image id="light2" source="invitebg2_png" x="376" y="297" anchorOffsetX="356" anchorOffsetY="296"/>
<e:Image id="light1" source="invitebg2_png" x="386" y="307" anchorOffsetX="356" anchorOffsetY="296"/>
<e:Group id="container" y="-98.45" x="-3"/>
<e:Image source="turprizebg_png" y="161" horizontalCenter="0.5"/>
<e:Image width="508" height="225" source="{data.url}" horizontalCenter="0" y="355.76"/>
<e:Image id="bg" source="turprizebg_png" y="161" horizontalCenter="0.5"/>
<e:Image id="img" width="508" height="225" source="{data.url}" horizontalCenter="0" y="355.76"/>
<e:Image id="prop" horizontalCenter="0" y="333.03" source="turnprize_icon1_png" scaleY="0.8" scaleX="0.8" visible="false"/>
<e:Image id="money" source="signprize元宝_png" y="336.2" horizontalCenter="0" scaleX="0.8" scaleY="0.8" visible="false"/>
<e:Image id="blood" source="singprize体力_png" y="298.8" horizontalCenter="0" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="344.4" visible="false">
<e:Image id="numsbg0" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="nums0" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
<e:Button id="closeBtn" label="" y="242.88" x="615">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -32,11 +39,11 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group id="status1" x="52" y="60" visible="false">
<e:Label text=")" x="132" y="2" size="22" touchEnabled="false"/>
<e:Label id="nums" text="(-50" x="0" y="0" size="22" textAlign="right" width="82" touchEnabled="false"/>
<e:Group id="status1" x="52" y="60">
<e:Label text=")" x="128.96" y="2" size="22" touchEnabled="false"/>
<e:Label id="nums" text="(-50" x="3.04" y="1.52" size="22" textAlign="right" width="82" touchEnabled="false"/>
<e:Image source="common_yuanbao_png" x="91.99" y="1.67"/>
</e:Group>
</e:Group>
<e:Label id="satus2" text="(免费次数:1)" x="169.3" y="693.66" size="22" touchEnabled="false" visible="false"/>
<e:Label id="status2" text="(免费次数:1)" x="169.3" y="693.66" size="22" touchEnabled="false" visible="false"/>
</e:Skin>
\ No newline at end of file
......@@ -2027,7 +2027,7 @@ export default class MainScene extends Scene {
else if (ele.hasState(StateType.HAIRBALLBROWN)) {
var hairballBrownState: HairballBrownState = ele.getState(StateType.HAIRBALLBROWN);
hairballBrownState.isActive = true;
//算个数,不能在这里算,得在分裂时算
//算个数,不能在这里算,得在分裂时算,分裂时算也有问题,目标完成就后置了,会出bug,最好就是不设为目标。
// this.goElementTarget(ElementType.HAIRBALLBROWN, [ele.x, ele.y]);
}
//有灰色毛球的,消失
......
......@@ -75,6 +75,15 @@ export default class MapScene extends Scene {
async start(data?) {
super.start();
NetManager.ins.hc_turnableDojoin((s,res)=>{
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
const data = res.data;
const _data = Utils.deepClone(data);
_data.mv = mv;
PanelCtrl.instance.show('TurnPrizePanel', _data);
});
});
this.addIcon(); // 添加Icon
this.sendInvite();
......@@ -484,7 +493,7 @@ export default class MapScene extends Scene {
if (!success || !res.data) {
return;
}
let flag = res.data.completeFlag;
const flag = res.data.completeFlag;
switch (true) {
case (flag == 0): // 未完成
this.loadsvga(res);
......@@ -561,7 +570,7 @@ export default class MapScene extends Scene {
if (!success || !res.data) {
return;
}
let flag = res.data.completeFlag;
const flag = res.data.completeFlag;
if (this.inviteTimer) {
this.inviteTimer.stop();
}
......@@ -611,7 +620,7 @@ export default class MapScene extends Scene {
// 倒计时
private inviteCutTimer() {
let timer = this.convertTime(this.cutTime -= 1000);
const timer = this.convertTime(this.cutTime -= 1000);
if (timer.hour === "00"
&& timer.min === "00"
&& timer.sec === "00") {
......@@ -623,9 +632,9 @@ export default class MapScene extends Scene {
// 通过时间戳获取时间计数(时,分,秒)
private convertTime(time: number) {
let hour = ~~(time / 3600000); // 小时
let min = ~~((time - hour * 3600000) / 60000); // 分
let sec = ~~((time - hour * 3600000 - min * 60000) / 1000); // 秒
const hour = ~~(time / 3600000); // 小时
const min = ~~((time - hour * 3600000) / 60000); // 分
const sec = ~~((time - hour * 3600000 - min * 60000) / 1000); // 秒
return {
hour: Utils.prefixInteger(hour, 2),
......
......@@ -15,15 +15,14 @@ export default class TurntableNoPrizePanel extends Panel {
addAdComp(84, 635, this);
if (this['tips' + data.type])
this['tips' + data.type].visible = true;
NetManager.ins.hc_turnableBaseInfo((success, res) => {
const data = res.data;
this['status1'].visible=data.remainTimes <=0;
this['status2'].visible=!this['status1'].visible;
this['nums'].text=`(-${data.remainTimes}`;
this['status2'].text=`免费次数:\n${data.remainTimes}次`;
});
NetManager.ins.hc_turnableBaseInfo((success, res) => {
const data = res.data;
this['status1'].visible = data.remainTimes <= 0;
this['status2'].visible = !this['status1'].visible;
this['nums'].text = `(-${data.nextTimeNeedCoin}`;
this['status2'].text = `免费次数:${data.remainTimes}次`;
});
}
showlog() {
......
......@@ -4,6 +4,7 @@ import { gotoNextLevel } from "../gotoNextLevel";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
import { NetManager } from "../../../libs/tw/manager/NetManager";
export default class TurnPrizePanel extends Panel {
start(data) {
......@@ -19,6 +20,21 @@ export default class TurnPrizePanel extends Panel {
this.playBgAni();
}, this);
this['container'].addChild(data.mv);
NetManager.ins.hc_turnableBaseInfo((success, res) => {
const data = res.data;
this['status1'].visible = data.remainTimes <= 0;
this['status2'].visible = !this['status1'].visible;
this['nums'].text = `(-${data.nextTimeNeedCoin}`;
this['status2'].text = `免费次数:${data.remainTimes}次`;
});
console.log(data)
this.updateOption(data.option);
}
updateOption(option: any) {
const { categoryType } = option;
}
playBgAni() {
......@@ -45,7 +61,7 @@ export default class TurnPrizePanel extends Panel {
console.log('再来一次');
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100);
PanelCtrl.instance.show('turnTable', { onceAgain: 1,mv:mv });
PanelCtrl.instance.show('turnTable', { onceAgain: 1, mv: mv });
});
}
onTap_btn2() {
......
......@@ -40,9 +40,9 @@
}
]
},
"remainTimes":0,
"remainTimes":11,
"costCoinJoinTimes":10,
"nextTimeNeedCoin":10000
"nextTimeNeedCoin":999999
},
"desc":"OK",
"success":true,
......
{
"code":"600051",
"code":"600015",
"data":{
"isScratchCard":false,
"option":{
......
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