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