Commit c5f48176 authored by wjf's avatar wjf

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

parents 5745a9bf 75e31530
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<script src="libs/fileSave.js"></script> <script src="libs/fileSave.js"></script>
<img id="pic" style="width:100%;position: absolute;z-index: 999;display: none;"/> <img id="pic" style="width:100%;position: absolute;z-index: 999;display: none;"/>
<script> <script>
window['hbRainTime'] = 30; window['hbRainTime'] = 30; // 红包雨倒计时
window['plugs'] = [1, 2, 3] window['plugs'] = [1, 2, 3]
// localStorage.clear(); // localStorage.clear();
window['isInvitePage'] = 0; window['isInvitePage'] = 0;
......
...@@ -316,6 +316,13 @@ export default class MapScene extends Scene { ...@@ -316,6 +316,13 @@ export default class MapScene extends Scene {
if(icon.parent) if(icon.parent)
count++; count++;
} }
if(this._avatarsCache) {
this._avatarsCache.forEach((item) => {
if(item.parent) item.parent.addChild(item);
});
}
} }
// 添加图标 // 添加图标
......
...@@ -60,6 +60,13 @@ export default class ActIcon { ...@@ -60,6 +60,13 @@ export default class ActIcon {
private onTap_actsShowBtn() { private onTap_actsShowBtn() {
this.actIconsGroup.visible = !this.actIconsGroup.visible; this.actIconsGroup.visible = !this.actIconsGroup.visible;
if(this.actIconsGroup.visible){
for(let k in this.icons){
if(this.icons[k].visible){
this.icons[k].showLog();
}
}
}
this.actIconsGroup.x = 12.12; this.actIconsGroup.x = 12.12;
if(this.actIconsGroup.visible == false) { if(this.actIconsGroup.visible == false) {
this.actIconsGroup.x = -999; this.actIconsGroup.x = -999;
......
...@@ -2,6 +2,7 @@ import IconBase from "./IconBase"; ...@@ -2,6 +2,7 @@ import IconBase from "./IconBase";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher"; import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import { NetManager } from "../../../libs/tw/manager/NetManager"; import { NetManager } from "../../../libs/tw/manager/NetManager";
import { getlogItem } from "../../Main";
export default class HbRainIcon extends IconBase { export default class HbRainIcon extends IconBase {
...@@ -15,6 +16,11 @@ export default class HbRainIcon extends IconBase { ...@@ -15,6 +16,11 @@ export default class HbRainIcon extends IconBase {
this.updateIcon(); this.updateIcon();
} }
public showLog() {
super.showLog();
NetManager.ins.showLog(getlogItem(57));
}
private updateIcon() { private updateIcon() {
NetManager.ins.hbRainBaseInfo((success, res) => { NetManager.ins.hbRainBaseInfo((success, res) => {
if(!success) { if(!success) {
...@@ -29,16 +35,18 @@ export default class HbRainIcon extends IconBase { ...@@ -29,16 +35,18 @@ export default class HbRainIcon extends IconBase {
return; return;
} }
this.visible = true; this.visible = true;
}) });
} }
/** /**
* 点击icon * 点击icon
* @param e 点击事件 * @param e 点击事件
*/ */
protected onTouchBtn(e: egret.TouchEvent) { protected onTouchBtn(e: egret.TouchEvent) {
super.onTouchBtn(e); super.onTouchBtn(e);
NetManager.ins.clickLog(getlogItem(57));
NetManager.ins.hbRainBaseInfo((success, res) => { NetManager.ins.hbRainBaseInfo((success, res) => {
PanelCtrl.instance.show("HbCutTime", {res: res}); PanelCtrl.instance.show("HbCutTime", {res: res});
}); });
......
...@@ -25,6 +25,10 @@ export default class IconBase { ...@@ -25,6 +25,10 @@ export default class IconBase {
this.start(); this.start();
} }
public showLog(){
}
/** /**
* 设置图标提示的隐藏与显示 * 设置图标提示的隐藏与显示
* @param visible * @param visible
......
...@@ -3,6 +3,7 @@ import CutTimer from "../../CutTimer"; ...@@ -3,6 +3,7 @@ import CutTimer from "../../CutTimer";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { NetManager } from "../../../libs/tw/manager/NetManager"; import { NetManager } from "../../../libs/tw/manager/NetManager";
import HbRule from "./HbRule"; import HbRule from "./HbRule";
import { getlogItem } from "../../Main";
/** /**
* 红包雨倒计时 * 红包雨倒计时
...@@ -50,6 +51,7 @@ export default class HbCutTime extends Panel { ...@@ -50,6 +51,7 @@ export default class HbCutTime extends Panel {
time = data.currentSession.endTime - sysTime + 3000; time = data.currentSession.endTime - sysTime + 3000;
if(data.canJoin) { if(data.canJoin) {
this.ok_btn.source = 'hbCutTime_btn_enable_png'; this.ok_btn.source = 'hbCutTime_btn_enable_png';
NetManager.ins.showLog(getlogItem(58));
this.btnEffect(); this.btnEffect();
this.ok_btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchOK, this); this.ok_btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchOK, this);
} else { } else {
...@@ -128,6 +130,7 @@ export default class HbCutTime extends Panel { ...@@ -128,6 +130,7 @@ export default class HbCutTime extends Panel {
} }
onTouchOK() { onTouchOK() {
NetManager.ins.clickLog(getlogItem(58));
PanelCtrl.instance.show('HbGame', {needScore: this.data.res.data.currentSession.limitScore}); PanelCtrl.instance.show('HbGame', {needScore: this.data.res.data.currentSession.limitScore});
} }
......
...@@ -6,6 +6,8 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; ...@@ -6,6 +6,8 @@ import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { addAdComp } from "../BoxPanel"; import { addAdComp } from "../BoxPanel";
import Utils from "../../Utils"; import Utils from "../../Utils";
import CutTimer from "../../CutTimer"; import CutTimer from "../../CutTimer";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { getlogItem } from "../../Main";
/** /**
* 红包雨无奖励 * 红包雨无奖励
...@@ -26,6 +28,7 @@ export default class HbNoPrize extends Panel { ...@@ -26,6 +28,7 @@ export default class HbNoPrize extends Panel {
} }
initUI() { initUI() {
NetManager.ins.showLog(getlogItem(60));
let type = this.data.type; let type = this.data.type;
switch(true) { switch(true) {
case (type == 1): case (type == 1):
...@@ -62,6 +65,7 @@ export default class HbNoPrize extends Panel { ...@@ -62,6 +65,7 @@ export default class HbNoPrize extends Panel {
} }
onTouchOK() { onTouchOK() {
NetManager.ins.clickLog(getlogItem(60));
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().levels.length + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
......
...@@ -4,6 +4,8 @@ import { changeMapScene } from "../../startScene/StartScene"; ...@@ -4,6 +4,8 @@ import { changeMapScene } from "../../startScene/StartScene";
import { GDispatcher } from "../../../libs/tc/util/GDispatcher"; import { GDispatcher } from "../../../libs/tc/util/GDispatcher";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { HtmlTextParser } from "../../../libs/new_wx/HtmlTextParser"; import { HtmlTextParser } from "../../../libs/new_wx/HtmlTextParser";
import { getlogItem } from "../../Main";
import { NetManager } from "../../../libs/tw/manager/NetManager";
/** /**
* 红包雨奖励 * 红包雨奖励
...@@ -57,6 +59,7 @@ export default class HbPrize extends Panel { ...@@ -57,6 +59,7 @@ export default class HbPrize extends Panel {
} }
initUI() { initUI() {
NetManager.ins.showLog(getlogItem(59));
} }
...@@ -76,6 +79,7 @@ export default class HbPrize extends Panel { ...@@ -76,6 +79,7 @@ export default class HbPrize extends Panel {
} }
onTouchOK() { onTouchOK() {
NetManager.ins.clickLog(getlogItem(59));
if((getHomeData().levels.length + 1) > window['last_level']) { if((getHomeData().levels.length + 1) > window['last_level']) {
changeMapScene(); changeMapScene();
super.hidePanel(); super.hidePanel();
......
...@@ -35,7 +35,7 @@ export default class RainMgr { ...@@ -35,7 +35,7 @@ export default class RainMgr {
GDispatcher.addEvent('hbRainGameOver', this.gameOver, this); GDispatcher.addEvent('hbRainGameOver', this.gameOver, this);
this.timer = new egret.Timer(1200, 0); this.timer = new egret.Timer(1000, 0);
this.timer.addEventListener(egret.TimerEvent.TIMER, this.addRain, this); this.timer.addEventListener(egret.TimerEvent.TIMER, this.addRain, this);
this.timer.start(); this.timer.start();
} }
......
...@@ -30,9 +30,9 @@ export default class RainObj { ...@@ -30,9 +30,9 @@ export default class RainObj {
this.module.alpha = 1; this.module.alpha = 1;
this.module.touchEnabled = true; this.module.touchEnabled = true;
this.module.source = `hbGame_${this.data.key}_png`; this.module.source = `hbGame_${this.data.key}_png`;
this.module.addEventListener(egret.TouchEvent.TOUCH_TAP, this.touchTap, this); this.module.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.touchTap, this);
egret.Tween.get(this.module, {loop: true}).to({rotation: ~~(Math.random() * 2) ? 360 : -360}, 18000); egret.Tween.get(this.module, {loop: true}).to({rotation: ~~(Math.random() * 2) ? 360 : -360}, 18000);
egret.Tween.get(this.module).to({y: this.rainGroup.height + 200}, 5000).call(() => this.destroy()); egret.Tween.get(this.module).to({y: this.rainGroup.height + 200}, 4000).call(() => this.destroy());
} }
private touchTap() { private touchTap() {
......
...@@ -122,10 +122,10 @@ export default class Turntable extends Panel { ...@@ -122,10 +122,10 @@ export default class Turntable extends Panel {
console.warn(error) console.warn(error)
} }
NetManager.ins.hc_turnableDojoin((success, res) => { NetManager.ins.hc_turnableDojoin((success, res) => {
NetManager.ins.hc_home(() => { // NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene(); // SceneCtrl.instance.updateScene();
this['nums'].text = `当前可用元宝:${getHomeData().wealth}`; // this['nums'].text = `当前可用元宝:${getHomeData().wealth}`;
}, window['collectRuleId']); // }, window['collectRuleId']);
Loading.instace.hide(); Loading.instace.hide();
// if(!success) { // if(!success) {
// return; // return;
...@@ -144,6 +144,10 @@ export default class Turntable extends Panel { ...@@ -144,6 +144,10 @@ export default class Turntable extends Panel {
id = data.option.categoryType; id = data.option.categoryType;
} }
this.rotateByPrize(id, () => { this.rotateByPrize(id, () => {
NetManager.ins.hc_home(() => {
SceneCtrl.instance.updateScene();
this['nums'].text = `当前可用元宝:${getHomeData().wealth}`;
}, window['collectRuleId']);
if(!success) { if(!success) {
switch(true) { switch(true) {
case (code == "600051"): // 元宝不足 case (code == "600051"): // 元宝不足
......
...@@ -2,11 +2,15 @@ ...@@ -2,11 +2,15 @@
"success": true, "success": true,
"code": "0000000000", "code": "0000000000",
"desc": "OK", "desc": "OK",
"timestamp": 1573131493110, "timestamp": 1573206010193,
"data": { "data": {
"currentSession": null,
"currentRemainTimes": 0, "currentRemainTimes": 0,
"nextSession": null, "currentSession": {
"canJoin": false "sessionIndex": 10,
"startTime": 1573210800000,
"endTime": 1573212600000,
"limitScore": 10
},
"canJoin": true
} }
} }
\ No newline at end of file
This diff is collapsed.
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"timestamp": 1571322224593, "timestamp": 1571322224593,
"data": [ "data": [
{ {
"levelNum": 21, "levelNum": 101,
"rank": [ "rank": [
{ {
"nickName": null, "nickName": null,
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
], ],
"id": null "id": null
}, },
"nextTimeNeedCoin": 8888 "nextTimeNeedCoin": 1
}, },
"success": true, "success": true,
"desc": "OK", "desc": "OK",
......
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