Commit 442597b8 authored by wildfirecode's avatar wildfirecode

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

parents de0618a7 cecf8f87
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"scratch","version":5,"files":["../assets/scratch/scratch_bg.png","../assets/scratch/scratch_hongbao.png","../assets/scratch/scratch_help.png","../assets/scratch/scratch_progress_bg.png","../assets/scratch/scratch_wx_tip.png","../assets/scratch/scratchbg2.png","../assets/scratch/scratch_invite.png","../assets/scratch/scratch_card_90.png","../assets/scratch/scratch_card_96.png","../assets/scratch/scratch_card_94.png","../assets/scratch/scratch_card_98.png","../assets/scratch/scratch_user1.png","../assets/scratch/scratch_card_bg.png","../assets/scratch/scratch_card_92.png","../assets/scratch/scratch_user2.png"]} {"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"scratch","version":5,"files":["../assets/scratch/scratch_bg.png","../assets/scratch/scratch_hongbao.png","../assets/scratch/scratch_help.png","../assets/scratch/scratch_progress_bg.png","../assets/scratch/scratch_wx_tip.png","../assets/scratch/scratchbg2.png","../assets/scratch/scratch_invite.png","../assets/scratch/scratch_card_90.png","../assets/scratch/scratch_card_96.png","../assets/scratch/scratch_card_94.png","../assets/scratch/scratch_card_98.png","../assets/scratch/scratch_user1.png","../assets/scratch/scratch_card_bg.png","../assets/scratch/scratch_card_92.png","../assets/scratch/scratch_user2.png","../assets/scratch/scratch_mask.png"]}
\ No newline at end of file \ No newline at end of file
...@@ -163,8 +163,6 @@ export default class MainScene extends Scene { ...@@ -163,8 +163,6 @@ export default class MainScene extends Scene {
oneStepScore: number; oneStepScore: number;
//果冻有消除的标记; //果冻有消除的标记;
jellyBrokenMark: boolean; jellyBrokenMark: boolean;
//有毛球消失的动画时,延迟掉落时间
hairballBrokenMark: boolean;
/** /**
* 判断连通的状态 * 判断连通的状态
* 1表示存在小列连通到大列,从右往左遍历 * 1表示存在小列连通到大列,从右往左遍历
...@@ -1710,15 +1708,13 @@ export default class MainScene extends Scene { ...@@ -1710,15 +1708,13 @@ export default class MainScene extends Scene {
this.eliminate(); this.eliminate();
}, 200) }, 200)
} else { } else {
//没有可消除元素,执行掉落,又加定制,因为毛球的消失动画比较长 650ms,用500 //没有可消除元素,执行掉落,
var time = this.hairballBrokenMark ? 500 : 200;
this.hairballBrokenMark = false;
setTimeout(() => { setTimeout(() => {
this.fall(() => { this.fall(() => {
//掉落停止回调 //掉落停止回调
this.fallCallback(); this.fallCallback();
}); });
}, time) }, 200)
} }
} }
/** /**
...@@ -2053,8 +2049,6 @@ export default class MainScene extends Scene { ...@@ -2053,8 +2049,6 @@ export default class MainScene extends Scene {
ele.setState(StateType.HAIRBALLGREY, false) ele.setState(StateType.HAIRBALLGREY, false)
//算个数 //算个数
this.goElementTarget(ElementType.HAIRBALLGREY, [ele.x, ele.y]); this.goElementTarget(ElementType.HAIRBALLGREY, [ele.x, ele.y]);
//标记有毛球消失
this.hairballBrokenMark = true
} }
//有黑色毛球的,一次眩晕,两次消失 //有黑色毛球的,一次眩晕,两次消失
else if (ele.hasState(StateType.HAIRBALLGREY)) { else if (ele.hasState(StateType.HAIRBALLGREY)) {
...@@ -2071,8 +2065,6 @@ export default class MainScene extends Scene { ...@@ -2071,8 +2065,6 @@ export default class MainScene extends Scene {
ele.setState(StateType.HAIRBALLBLACK, false) ele.setState(StateType.HAIRBALLBLACK, false)
//算个数 //算个数
this.goElementTarget(ElementType.HAIRBALLBLACK, [ele.x, ele.y]); this.goElementTarget(ElementType.HAIRBALLBLACK, [ele.x, ele.y]);
//标记有毛球消失
this.hairballBrokenMark = true
} }
} }
//如果有特效,存下 //如果有特效,存下
......
...@@ -26,6 +26,7 @@ import ScratchIcon from "./icon/ScratchIcon"; ...@@ -26,6 +26,7 @@ import ScratchIcon from "./icon/ScratchIcon";
import TurntableIcon from "./icon/TurntableIcon"; import TurntableIcon from "./icon/TurntableIcon";
let doHelpFlag = false; let doHelpFlag = false;
let doScratchHelpFlag = false;
// let adTag = false; // let adTag = false;
export default class MapScene extends Scene { export default class MapScene extends Scene {
static adData; static adData;
...@@ -43,12 +44,12 @@ export default class MapScene extends Scene { ...@@ -43,12 +44,12 @@ export default class MapScene extends Scene {
sendInvite() { sendInvite() {
const code = Utils.getRequestByKey('shareCode'); const code = Utils.getRequestByKey('shareCode');
if(!code) return; if(!code) return;
const dojoin = DataManager.ins.getData('hc_doJoin');
if(!dojoin) return;
if(doHelpFlag) { if(doHelpFlag) {
return; return;
} }
if(code.indexOf("12345678") == -1){ // 邀请有礼 if(code.indexOf("12345678") == -1){ // 邀请有礼
const dojoin = DataManager.ins.getData('hc_doJoin');
if(!dojoin) return;
NetManager.ins.doHelp((success, res) => { NetManager.ins.doHelp((success, res) => {
doHelpFlag = true; doHelpFlag = true;
switch(true) { switch(true) {
......
...@@ -72,17 +72,16 @@ export default class ScratchIcon extends IconBase { ...@@ -72,17 +72,16 @@ export default class ScratchIcon extends IconBase {
return; return;
} }
let status = res.data.taskStatus; let status = res.data.taskStatus;
let data = Utils.deepClone(res.data);
switch(true) { switch(true) {
case (status == 0): // 当前无任务(一般icon不会出现),拦截 case (status == 0): // 当前无任务(一般icon不会出现),拦截
break; break;
case (status == 1): // 当前任务进行中 打开任务面板 case (status == 1): // 当前任务进行中 打开任务面板
loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/sprize.svga').then(async (mv: any) => {
// await wait(100); // await wait(100);
let data = Utils.deepClone(res.data);
data.mv = mv; data.mv = mv;
PanelCtrl.instance.show('scratch', data); PanelCtrl.instance.show('scratch', data);
}); });
// PanelCtrl.instance.show('scratch', res.data);
break; break;
case (status == 2): // 当前任务完成待领奖 请求领奖接口 case (status == 2): // 当前任务完成待领奖 请求领奖接口
NetManager.ins.scratchTakePrize((success, res) => { NetManager.ins.scratchTakePrize((success, res) => {
...@@ -92,7 +91,7 @@ export default class ScratchIcon extends IconBase { ...@@ -92,7 +91,7 @@ export default class ScratchIcon extends IconBase {
} }
return; return;
} }
PanelCtrl.instance.show("scratchPrize", res.data); PanelCtrl.instance.show("scratchPrize", data);
}, res.data.scratchCardTaskId); }, res.data.scratchCardTaskId);
break; break;
......
...@@ -188,25 +188,6 @@ export default class ScratchPanel extends Panel { ...@@ -188,25 +188,6 @@ export default class ScratchPanel extends Panel {
let dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值 let dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值
let _duration = 1000 * dProgress / 100; // 算出变化的时间 let _duration = 1000 * dProgress / 100; // 算出变化的时间
egret.Tween.get(this["progress"]).to({width: _width}, _duration); egret.Tween.get(this["progress"]).to({width: _width}, _duration);
let i = new eui.Image();
// if(progress >= 100) {
// this["scratch_progress"].visible = false;
// } else if(progress >= 98 && progress < 100) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_98_png";
// } else if(progress >= 96 && progress < 98) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_96_png";
// } else if(progress >= 94 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_94_png";
// } else if(progress >= 92 && progress < 96) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_92_png";
// } else if(progress < 92) {
// this["scratch_progress"].visible = true;
// this["scratch_progress"].source = "scratch_card_90_png";
// }
} }
private setWXShareTip() { private setWXShareTip() {
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
"success": true, "success": true,
"code": "0000000000", "code": "0000000000",
"desc": "OK", "desc": "OK",
"timestamp": 1572405066301, "timestamp": 1572420059060,
"data": { "data": {
"scratchCardTaskId": 1, "scratchCardTaskId": 3,
"taskStatus": 1, "taskStatus": 2,
"prizeImage": "//yun.dui88.com/images/201910/9u6nk8sjt8.jpg", "prizeImage": "//yun.dui88.com/images/201910/9u6nk8sjt8.jpg",
"currentTime": 1572405066290, "currentTime": 1572420059060,
"endTime": 1572491337000, "endTime": 1572493282000,
"completePercent": "96", "completePercent": "100",
"remainPercent": "9.0", "remainPercent": "0",
"totalNeedCount": 1, "totalNeedCount": 1,
"helpedCount": 0, "helpedCount": 1,
"avatarList": [] "avatarList": null
} }
} }
\ 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