Commit 0cf0e2a4 authored by zjz1994's avatar zjz1994

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

# Conflicts:
#	egret/src/something/chapters/Chapter31.ts
修改关卡
parents b6fecd81 c6feb6f1
......@@ -543,7 +543,7 @@ export default class MainBase extends eui.UILayer {
return new Promise((r) => {
NetManager.ins.hc_advert(() => {
r();
})
},3)
});
}
......@@ -639,7 +639,7 @@ export default class MainBase extends eui.UILayer {
//获取分享加体力的shareCode,不影响初始化场景,不进await
NetManager.ins.getUserShareCode(() => { })
MapScene.adData = DataManager.ins.getData('hc_advert');
MapScene.adData = DataManager.ins.getData('hc_advert_3');
Buried.init();
///////////
......
......@@ -179,7 +179,7 @@ export class DataManager extends ABDataManager {
* @returns {any}
*/
// tslint:disable-next-line:cyclomatic-complexity
public updateData(name: number, result: any, param?: any): Data {
public updateData(name: any, result: any, param?: any): Data {
let data: Data;
switch (name) {
case NetName.GET_ROLE:
......@@ -617,7 +617,12 @@ export class DataManager extends ABDataManager {
this._getRecordData.update(result);
data = this._getRecordData;
default:
this[this.getKey(name)] = result;
if(name=="hc_advert"){
this[this.getKey(name+"_"+param.type)] = result;
console.log("新广告,分展示位单个区别获取",name,result,param);
}else{
this[this.getKey(name)] = result;
}
}
this.dispatchEvent(new egret.Event('dataUpdate', false, false, name));
return data || result;
......
......@@ -1461,7 +1461,7 @@ export class NetManager extends ABNetManager {
this.send(net);
}
public hc_advert(callback: Function): void {
public hc_advert(callback: Function,type): void {
var deviceId:string = '';
var cityCode:string = '';
const net: INetData = {
......@@ -1472,7 +1472,8 @@ export class NetManager extends ABNetManager {
param: {
activityId: DataManager.ins.customCfgData.actId,
deviceId:deviceId,
cityCode:cityCode
cityCode:cityCode,
type:type
},
hideMsg: true,
callback: callback
......
......@@ -3452,7 +3452,8 @@ export default class MainScene extends Scene {
}
//如果只有步数转化的,不能再进结算,
else {
// /**
//一次大消除结束
/**
var effectElements = [], elements = [];
for(var i = Tool.colNum * Tool.rowNum - 1; i >= 0; i--) {
var lat = this.lattices[i];
......@@ -3469,7 +3470,7 @@ export default class MainScene extends Scene {
this.eliminate();
return;
}
// */
*/
// else{
// console.log("可以结束");
// }
......
......@@ -5,6 +5,7 @@ import { Tool } from "../something/Tool";
import { Lattice } from "../something/class/Lattice";
import { RecoverName } from "../something/enum/RecoverName";
import { StateType } from "../something/enum/StateType";
import Block from "../something/block/Block";
/**
* fish爆炸
*/
......@@ -15,9 +16,12 @@ export default async (thisObj: MainScene) => {
for (var i = 0; i < thisObj.lattices.length; i++) {
const lattice = thisObj.lattices[i]
if (lattice && lattice.element && lattice.element.type == ElementType.FISH && lattice.element.isNeb) {
lattice.element.fishCanEliFlag = true;
indexs.push(lattice.index);
thisObj.eliminatedElements.push(lattice.index);
// console.log("遗漏河豚---",lattice.element.hasState(StateType.BLOCK_LOCK));
if(!lattice.element.hasState(StateType.BLOCK_LOCK)){
lattice.element.fishCanEliFlag = true;
indexs.push(lattice.index);
thisObj.eliminatedElements.push(lattice.index);
}
}
}
......
......@@ -17,7 +17,7 @@ export default class AdSmallComp extends ComponentBase {
this['img'].mask = this['adsmask'];
}
NetManager.ins.hc_advert(() => {
const { data } = DataManager.ins.getData('hc_advert');
const { data } = DataManager.ins.getData('hc_advert_2');
let { popupAdvert } = data;
if (popupAdvert == null)
popupAdvert = { enable: false, advertList: [] }
......@@ -34,7 +34,7 @@ export default class AdSmallComp extends ComponentBase {
snpmAdStatic.snpmAdReport("show","bottom",result);
this.data.img = result.img;
}
});
},2);
this['img'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if(result.url.length>2){
......
......@@ -171,7 +171,7 @@ export default class MapScene extends Scene {
this.updateAdData();
this['avatar'].mask = this['avatarMask'];
NetManager.ins.getSignInfo(() => {
NetManager.ins.getSignInfo(async() => {
const parmas = [];
const panels = [];
const result = this.sendInvite(panels, parmas);
......@@ -187,22 +187,36 @@ export default class MapScene extends Scene {
const nowTimerStr2 = date.getTime() + '';
const oldTimerStr2 = localStorage.getItem('nowTimer2Str' + window['CFG'].consumerId);
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
let { noticeAdvert } = hc_advert;
if (noticeAdvert == null) {
noticeAdvert = { enable: false }
}
noticeAdvert = DataManager.ins.solveAdvertData(noticeAdvert);
if (noticeAdvert && noticeAdvert.enable && nowTimerStr2 != oldTimerStr2) {
// if (!adTag) {
panels.push('ad');
// adTag = true;
// }
localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
if(nowTimerStr2 != oldTimerStr2){
console.log("时间上需要弹出广告");
var adpro = new Promise(res=>{
NetManager.ins.hc_advert(()=>{
const hc_advert = DataManager.ins.getData('hc_advert_1').data || {};
console.log("1广告数据",hc_advert);
let { noticeAdvert } = hc_advert;
if (noticeAdvert == null) {
noticeAdvert = { enable: false }
}
noticeAdvert = DataManager.ins.solveAdvertData(noticeAdvert);
if (noticeAdvert && noticeAdvert.enable){
panels.push('ad');
localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
}
res();
},1);
});
await adpro;
console.log("时间弹出广告结束");
}
// if (noticeAdvert && noticeAdvert.enable && nowTimerStr2 != oldTimerStr2) {
// // if (!adTag) {
// panels.push('ad');
// // adTag = true;
// // }
// localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
// }
const backData = DataManager.ins.getData('hc_hasBackReward');
if (backData.success) {
backData.success = false;
......@@ -1035,7 +1049,7 @@ export default class MapScene extends Scene {
// 更新广告数据
updateAdData() {
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
const hc_advert = DataManager.ins.getData('hc_advert_3').data || {};
let { mapAdvert } = hc_advert;
if (mapAdvert == null)
mapAdvert = { enable: false, advertList: [] }
......@@ -1439,7 +1453,7 @@ export default class MapScene extends Scene {
* 查询邀请信息
*/
getInviteInfo() {
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
const hc_advert = DataManager.ins.getData('hc_advert_3').data || {};
let { mapAdvert } = hc_advert;
mapAdvert = DataManager.ins.solveAdvertData(mapAdvert);
// tslint:disable-next-line: cyclomatic-complexity
......
......@@ -2,7 +2,7 @@ import { DataManager } from "../../libs/tw/manager/DataManager";
export default () => {
const hc_advert:any = DataManager.ins.getData('hc_advert').data || {};
const hc_advert:any = DataManager.ins.getData('hc_advert_3').data || {};
let { mapAdvert } = hc_advert;
if (mapAdvert == null)
mapAdvert = { enable: false, advertList: [] }
......
......@@ -11,7 +11,7 @@ export default class ADPanel extends Panel {
this.showlog();
let result;
const hc_advert = DataManager.ins.getData('hc_advert').data;
const hc_advert = DataManager.ins.getData('hc_advert_1').data;
let { noticeAdvert } = hc_advert;
noticeAdvert = DataManager.ins.solveAdvertData(noticeAdvert);
this.visible = noticeAdvert.enable;
......
This diff is collapsed.
......@@ -72,9 +72,10 @@ export class Element extends eui.Component {
}
}
async nextFishState() {
// console.log("河豚充能");
// console.log("河豚充能",this.hasState(StateType.BLOCK_LOCK),this.index);
await wait(1000);
this._fishState++;
// console.log(this._fishState,this.index);
if (this._fishState == 1) {
this['fish'].toActive();
}
......
......@@ -60,7 +60,7 @@ export default class Food extends eui.Component{
var icol:number = [this.usecol,this.userow][inidx];
//row和col反了
console.log(this.type+'食物占位'+inidx+'row:'+irow+';col:'+icol);
// console.log(this.type+'食物占位'+inidx+'row:'+irow+';col:'+icol);
this.lockidxs = new Array();
this.freeidxs = new Array();
for(var i=0;i<icol;i++){
......@@ -70,7 +70,7 @@ export default class Food extends eui.Component{
this.lockidxs.push(latidx);
}
}
console.log('解锁idxs',this.lockidxs);
// console.log('解锁idxs',this.lockidxs);
this.showImage.rotation = roa;
......
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